Define jobs from project
Render Jenkins job and execute commands from
jenkins.yml. These two steps
are completely independant.
jenkins_yml provide a python API to render a Jenkins job XML config from a
YAML payload. It does not manage Jenkins I/O to effectively create the job. See
Jenkins EPO to create jobs and
schedule builds from GitHub.
jenkins_yml provide a simple yet pluggable CLI script to executes
de tests commands from
Jenkins Job features
The purpose of Jenkins YML is not to expose all Jenkins features, but to setup a sane default set of features you expect from a CI, and ask you the question you value.
- Define parameters and default values.
- Define matrix job axis.
- Define periodic job.
- Target Jenkins node per build.
- Search git clone reference in
/var/lib/jenkins/references/<owner>/<repository>/. It's up to you to create a mirror clone here or not.
- Set GitHub commit status to pending.
- Parameterized revision.
after_script, always runned after build, even on abort.
- Collect arctefacts from
_ci/directory. Full path is available in
- Reads XUnit XML from
- Reads coverage report from
- Globally disable jobs from Jenkins.
On your Jenkins executor,
pip3 install jenkins-yml and then use
jenkins-yml-runner as shell command.
jenkins.yml file at the root of the project. This file contains a
JOB_NAME to scripts. For example:
app-lint: | flake8 app/ app-tests: axis: TOXENV: [py27, py34, py35] script: | tox -r app-doc: script: | tox -e sphinx -r
To test a job, simply run: