My jobs are configured with a file named "config.xml" rather than a file named "jenkins.xml". I don't have a file named "jenkins.xml" anywhere on the file system of my Jenkins server. That may be part of the challenge you're facing (wrong file name?).
Another challenge may be that the Jenkins server probably reads and caches the job definition and even if you replace config.xml with another file (with different contents), the in-memory copy of the config.xml file will continue to be used instead. There is a "Reload Configuration from Disk" link in the "Manage Jenkins" page of your Jenkins server which will force Jenkins to read the configuration files from disc again. You might need to click that link in order to have your updated configuration reloaded into memory. Another challenge may be that the default workspace directory (jobs/JOB_NAME/workspace/) is not the directory which stores the job definition. The job definition (on my installation at least) is in jobs/JOB_NAME/config.xml. The default location where the git plugin will clone your repository is not the directory which contains the job definition. Thanks Mark Waite >________________________________ > From: John Lindwall <[email protected]> >To: [email protected] >Sent: Tuesday, June 5, 2012 3:50 PM >Subject: What jenkins.xml is used to build a wiped-out workspace? > > >We are trying to figure out an odd behavior. We have an "automation" git repo >containing (only) a jenkins.xml that use the GitSCM plug-in to clone and build >a different repo and then execute a number of automation tests on it. The idea >is that we can tweak the settings in the jenkins.xml file in the "automation" >repo to configure various test settings for our product (which is then cloned >into the workspace,built and put under test). > > >It does not seem like changes to our "automation" jenkins.xml file are beng >picked up. At the moment we replaced this jenkins.xml file with an empty >file. However, when we wipe out the workspace and then click "Build Now" in >the jenkins UI it performs the git cloen and other operations EVEN THOUGH THE >JENKINS.XML WE COMMITTED TO GIT IS EMPTY. > > >What jenkins.xml file does git use when the workspace has been wiped out? I >can only assume it pulls the latest from git, however if that were working >then our jenkins.xml file would be empty. > > >Thanks for any ideas. > >
