Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I mass edit jenkins jobs by modifying the config.xml files?

Tags:

I have a lot of jobs in jenkins and we have decided to make some wide ranging changes to all of them which will be very tedious to change through the UI. It would be much easier to edit them using scripts on the jenkins master machine but I'm not sure how to get jenkins to recognize changes to the the config.xml that haven't come through the UI or another api.

Is there a way to get jenkins to refresh job configurations from disk? Or a better way of mass editing jobs?

like image 232
chrisst Avatar asked Aug 11 '11 18:08

chrisst


People also ask

What is the use of config xml in Jenkins?

The config. xml file contains information about Jenkins like version, Pipeline information, owner, etc. It also contains the workspace Directory path, builds Directory path.

How do I change Jenkins configuration?

So one can get the various configuration options for Jenkins by clicking the 'Manage Jenkins' option from the left hand menu side. Click on Configure system.


1 Answers

Under the "Managr Hudson" option, there's a "Reload Configuration from Disk" item that will do what you want - re-reads the config.xml for projects while Hudson is running. You can always restart Hudson to get the same effect.

like image 176
Jason Swager Avatar answered Nov 11 '22 07:11

Jason Swager