Skip to content

Jenkinsator is a script that simplifies some basic ops around the Jenkins master

License

Notifications You must be signed in to change notification settings

Jimilian/jenkinsator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jenkinsator

Build Status

How to install it

Just download jenkinsator.py file and follow the instructions.

How to use it

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

How to provide credentials in secure way

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.

Supported features

  • 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

Road map

  • Change the job configuration
  • Print queue content

Work in Progress! So far jenkinsator was tested with python3.4+ only.

About

Jenkinsator is a script that simplifies some basic ops around the Jenkins master

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published