3
votes

I had a jenkins job, which was later cloned and modified. Now I'd like to compare the configurations for both jobs. Not the historical changes, not the results, but the configurations for both jobs.

Is it possible to compare the configuration for two Jenkins jobs?

3

3 Answers

5
votes

Try:

diff $JENKINS_HOME/jobs/job1/config.xml $JENKINS_HOME/jobs/job2/config.xml

or

vimdiff $JENKINS_HOME/jobs/job1/config.xml $JENKINS_HOME/jobs/job2/config.xml
1
votes

Mainframer is getting the answer, but I found a different way.

If you have access to the machine you can do a diff on the xml files. They are kept in the folders under " $JENKINS_HOME/jobs//config.xml". However if you don't have access to the folders, you can still compare the jobs. Open "job configuration history" and download the latest from the two jobs and compare them with your favourite diff tool.

0
votes

I'm not aware of an existing plugin for Jenkins that will let you do this, but you can manually check the configuration files for each of these in something like notepad++ and highlight the differences between the files.

You can find the configuration files in their respective job/ folders, in the file named 'config.xml'