Introduction¶
Jenkins-autojobs is a set of scripts that automatically create Jenkins jobs from template jobs and the branches in an SCM repository. Jenkins-autojobs supports Git, Mercurial and Subversion.
A routine run goes through the following steps:
- Read settings from a configuration file.
- List branches or refs from SCM.
- Creates or updates jobs as configured.
In its most basic form, the configuration file specifies:
- How to access Jenkins and the SCM repository.
- Which branches to process and which to ignore.
- Which template job to use for which branches.
- How new jobs should be named.
Autojobs can also:
- Add newly created jobs to Jenkins views.
- Cleanup jobs for which a branch no longer exists.
- Perform text substitutions on all text elements of a job’s
config.xml
. - Update jobs when their template job is updated.
- Set the enabled/disabled state of new jobs. A new job can inherit the state of its template job, but an updated job can keep its most recent state.
Please refer to the tutorial and the example output to get started. You may also have a look at the annotated git, svn and hg config files.
Notice: The documentation is in the process of being completely rewritten. Things may seem incomplete and out of place.
Installing¶
The latest stable version of jenkins-autojobs can be installed from pypi using pip.
$ pip install jenkins-autojobs
Jenkins-autojobs depends on a version of lxml with support for XML
canonicalization (c14n). Setup will attempt to install one if it is not
present on your system. You might have to install the libxml
and
libxslt
development headers if you haven’t already done so:
On a Debian compatible OS:
$ apt-get install libxml2-dev libxslt1-dev
On a Redhat compatible OS:
$ yum install libxml2-devel libxslt-devel
On Arch Linux or derivatives:
$ pacman -S libxslt libxml2
Changes¶
- Changelog
- 0.17.4 (Mar 03, 2016)
- 0.17.3 (Feb 10, 2016)
- 0.17.2 (Jan 21, 2016)
- 0.17.0 (Oct 19, 2015)
- 0.16.2 (Oct 02, 2015)
- 0.16.1 (Sep 30, 2015)
- 0.16.0 (Sep 23, 2015)
- 0.15.1 (May 05, 2015)
- 0.15.0 (Feb 16, 2015)
- 0.14.3 (Jan 02, 2015)
- 0.14.2 (Nov 24, 2014)
- 0.14.1 (Nov 23, 2014)
- 0.14.0 (Oct 27, 2014)
- 0.13.1 (May 29, 2014)
- 0.13.0 (Apr 08, 2014)
- 0.12.0 (Mar 09, 2014)
- 0.11.0 (Feb 04, 2014)
- 0.10.0 (Jan 08, 2014)
- 0.9.1 (Jan 08, 2014)
- 0.9.0 (Nov 27, 2013)
- 0.6.0 (Sep 05, 2012)
- 0.5.0 (Aug 06, 2012)
Similar Projects¶
License¶
Jenkins-autojobs is released under the terms of the Revised BSD License. All figures are derived from the Jenkins logo and are released under the CC BY-SA 3.0 license.