Description of problem: jenkinsUrl is included in file jenkins.model.JenkinsLocationConfiguration.xml which is not generated until a manual job is triggered. This is jenkinsURL is necessary for some plugins like the `stashnotifier-plugin` Version-Release number of selected component (if applicable): registry.access.redhat.com/openshift3/jenkins-2-rhel7 v3.6.173.0.49-5 How reproducible: Always Steps to Reproduce: 1. deploy jenkins from template (ephemeral or persistent) Actual results: The file /var/lib/jenkins.model.JenkinsLocationConfiguration.xml does not exist. Expected results: File /var/lib/jenkins.model.JenkinsLocationConfiguration.xml should exist and contain a jenkinsUrl element with a valid value Additional info: When a new job is manually created, then the file is created. Below an example: <?xml version='1.0' encoding='UTF-8'?> <jenkins.model.JenkinsLocationConfiguration> <jenkinsUrl>https://jenkins.apps.example.com/</jenkinsUrl> </jenkins.model.JenkinsLocationConfiguration>
The only way I see this happening is a hack where one of our plugins (the login plugin would probably be the best choice) calls Jenkins.getInstance().getRootUrl() for the value and then populates this file.
I'm curious how/if this works in a typical jenkins deployment. What creates the file and when? If this is jenkins behavior (that the file is not created until a job is manually created) then i don't see why we would be responsible for doing anything differently. From what i can tell from a little experimenting, this is totally driven by jenkins behavior and you'd have to open an issue w/ upstream jenkins to get them to change how/when that file is created.
I ran a simple non-scientific test by running the jenkins.war by itself. The jenkins.model.JenkinsLocationConfiguration.xml file is not created until I make a change to the config and save it.
Issue filed on Jenkins project: https://issues.jenkins-ci.org/browse/JENKINS-48079 Thanks for the effort