Commit 04081f92 authored by intrigeri's avatar intrigeri
Browse files

Jenkins design doc: fix typos, simplify, and update

parent f657c43d
......@@ -5,52 +5,51 @@
Generating jobs
===============
We use code that lay in three different Git repositories to generate
automatically the list of Jenkins jobs for branches that are active in
the Tails main Git repo.
The first brick is the Tails
[[!tails_gitweb_repo pythonlib]], which extracts the list of
active branches and output the needed informations. This list is parsed
by the `generate_tails_iso_jobs` script run by a cronjob and deployed by
our [[!tails_gitweb_repo puppet-tails]]
We generate automatically a set of Jenkins jobs for branches that are
active in the Tails main Git repository.
The first brick extracts the list of active branches and output the
needed information:
- [[!tails_gitweb config/chroot_local-includes/usr/lib/python3/dist-packages/tailslib/git.py]]
- [[!tails_gitweb config/chroot_local-includes/usr/lib/python3/dist-packages/tailslib/jenkins.py]]
This list is parsed by the `generate_tails_iso_jobs` script run by
a cronjob and deployed by our [[!tails_gitweb_repo puppet-tails]]
`tails::jenkins::iso_jobs_generator` manifest.
This script output yaml files compatible with
This script output YAML files compatible with
[jenkins-job-builder](http://docs.openstack.org/infra/jenkins-job-builder).
It creates one `project` for each active branches, which in turn uses
three JJB `job templates` to create the three jobs for each branch: the
ISO build one, and wrapper job that is used to start the ISO test jobs.
It creates one `project` for each active branch, which in turn uses
several JJB `job templates` to create jobs for each branch:
- `build_Tails_ISO_*`
- `reproducibly_build_Tails_ISO_*`
- `test_Tails_ISO_*`
This changes are pushed to our [[!tails_gitweb_repo jenkins-jobs]] git
repo by the cronjob, and thanks to their automatic deployment in our
`tails::jenkins::master` and `tails::gitolite::hooks::jenkins_jobs`
manifests in our [[!tails_gitweb_repo puppet-tails]] repo, this new
changes are applied automatically to our Jenkins instance.
manifests in our [[!tails_gitweb_repo puppet-tails]] repo, these new
changes are applied to our Jenkins instance.
Passing parameters through jobs
===============================
We already specified what kind of informations we want to pass from the
build job to the test job.
The ParameterizedTiggerPlugin is the one usually used for that kind of
work.
We'll use it for some basic parameter passing through jobs, but given
the test jobs will need to know a lot of them from the build job, we'll
also use the EnvInject plugin we're already using:
* In the build job, a script will collect every necessary parameters
defined in the automated test blueprint and outputing them in a file
in the /build-artifacts/ directory.
* This file is the one used by the build job, to setup the variables it
needs (currently only $NOTIFY_TO).
* At the end of the build job, this file is archived with the other
artifacts.
* At the beginning of the chained test job, this file is imported in
the workspace along with the build artifacts. The EnvInject pre-build
step uses it to setup the necessary variables.
We pass information from build job to follow-up jobs (reproducibility
testing, test suite) via two means:
- the Parameterized Trigger plugin, whenever it's sufficient
- the EnvInject plugin, for more complex cases:
* In the build job, a script collects the needed information and
writes it to a file that's saved as a build artifact.
* This file is used by the build job itself, to setup the variables it
needs (currently only `$NOTIFY_TO`).
* Follow-up jobs imported this file in the workspace along with the
build artifacts, then use an EnvInject pre-build step to load it
and set up variables accordingly.
# Builds
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment