Naginator Plugin module for jenkins-job-builder¶
Python module that extends jenkins-job-builder to support new publisher,
naginator
.
Naginator Publisher¶
-
naginator
[source]¶ Automatically reschedule a build after a build failure. Requires the Jenkins Naginator Plugin
Parameters: - max-retries (int) – Limits successive failed build retries. Set to 0 for no limit. Default is 0.
- rerun-if-unstable (bool) – Rerun build for unstable builds as well as failures. Default is false.
- delay (dict) –
delay: Must specify either fixed or progressive. Default is fixed with delay of 0. - fixed (dict)
fixed: - delay (int) seconds to wait before retry. Default is 0.
- progressive (dict)
progressive: Progressively delay before retrying build. The delay starts at increment seconds and grows by increment * number of consecutive failures
up to the maximum value, then remains at maximum. e.g. (5, 10, 20, 35, 55, ..., maximum) seconds.- increment (int) - default is 0
- maximum (int) - default is 0
- fixed (dict)
- check-regexp (bool) – Only rerun build if regular expression is found in output. Default is false.
- regexp-for-rerun (str) – Regular expression to search for.
Example:
publishers: - naginator: max-retries: 3 rerun-if-unstable: true delay: fixed: delay: 10
Installation¶
pip install jenkins-job-builder-naginator
Development¶
To work on this project, install the dependencies, install the develop branch, make change, and run tests with tox:
pip install -r requirements.txt -r test-requirements.txt
python setup.py develop
# ... make changes ...
tox
Note
It is best to use a virtualenv for developing this package.