Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compare Jenkins Configuration for two different jobs

Tags:

jenkins

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?

like image 573
Alexandre Santos Avatar asked Mar 15 '23 06:03

Alexandre Santos


2 Answers

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
like image 194
mainframer Avatar answered Mar 20 '23 21:03

mainframer


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.

like image 33
Alexandre Santos Avatar answered Mar 20 '23 20:03

Alexandre Santos