Just download jenkinsator.py file and follow the instructions.
I.e. replace all occurances of SOURCE by DEST for the list of jobs provided in file jobs.txt:
python jenkinsator.py JENKINS_URL --login=LOGIN --password=PASSWORD job --replace "#SOURCE#DEST" --list-from-file=jobs.txt
For more details check:
python jenkinsator.py --help
The tool supports two ways: secure and in-secure (as it was shown in example above). The secure way is a little bit more complex and it uses the magic of .netrc in case of Linux/Mac or _netrc on Windows. So, all you need is to create a ~/.netrc file this follow content:
default
login <your_login>
password <your_password>
or
machine <jenkins_host_name>
login <your_login>
password <your_password>
If you just created the .netrc file, you must change the permission to 600 using the follow command:
chmod 600 ~/.netrc
Done! Now jenkinsator will be able to get the credentials from this file.
- Replace pattern in job/node config
- Create new job from config.xml file
- Dump job configuration to thie
- Enable/disable/delete the job
- Enable/disable/delete the node
- List all plugins
- Execute custom Groovy script
- Change the job configuration
- Print queue content
Work in Progress! So far jenkinsator was tested with python3.4+ only.