Jenkins automation scripts
Python Shell
Failed to load latest commit information.
autojenkins Add method to get console text for a job Jun 1, 2016
docs Fix documentation typos Nov 2, 2012
.gitignore More ignores May 1, 2012
.travis.yml Exclude Python 3.2 due to SyntaxErrors in coverage. Nov 12, 2015
AUTHORS Centralise HTTP requests to remove argument duplication. Plus PEP8. Nov 2, 2012
README.markdown Update README.markdown Nov 16, 2012
README.rst extended documentation for enable / disable jobs Feb 27, 2012
TODO.txt Add TODO Mar 12, 2012 Add method to get console text for a job Jun 1, 2016
package-requirements.txt Add release script Oct 7, 2014
requirements.txt Prepare 1.0 by tidying up requirements etc Oct 7, 2014 Added script to trigger building ReadTheDocs documentation Jul 10, 2012 Prepare 1.0 by tidying up requirements etc Oct 7, 2014
test-requirements.txt Update dependency on coverage to work around installation bug with 3.… Nov 12, 2015


Travis CI


Automation (remote control) of Jenkins tasks. Includes a class autojenkins.Jenkins that you can use to drive Jenkins.

Things you can do with it:

  • Copy a job (e.g. from a template job)
  • Delete a job
  • Obtain the config.xml file for that job
  • Trigger building of a job
  • Obtain latest execution results
  • ...

Sample use:

from autojenkins import Jenkins

j = Jenkins('')

# trigger a manual build and check results'warehouse-screens-us544_login')

# get only the result string (one of 'SUCCESS', 'UNSTABLE', 'FAILURE'):

# get the configuration file for a job:

# Create a new job from a job named 'template', replacing variables
j.create_copy('my-new-job', 'template',

# build'my-new-job')

# enable or disable

# check result and delete if successful:
result = j.last_result('my-new-job')['result']
if result == 'SUCCESS':


If your Jenkins server uses authentication, you can use HTTP basic authentication in this way:

jenkins = Jenkins('http://jenkins', auth=('user', 'pass'))

Note that you can use either a cleartext password or a Jenkins API token as the password.