This page should be used to collect ideas to shape Kieker's delivery pipeline
Table of Contents
Table of Contents | ||||
---|---|---|---|---|
|
Pipelines
Pull request
Executed for a pull request of a branch to master
issued via GitHub. A merge request can be accepted only if this pipeline executes successfully.
Stages:
- 0-init
- 1-compile
- 2-unit-test
- 3-distribute
- 4-checkscript
The scripts executed in the stages can be found at Our current delivery pipeline is using infrastructure as code using a declarative Jenkinsfile that is parsed by Jenkins upon receiving a manual trigger or a webhook from GitHub.
Build Pipeline
The current Jenkinsfile in the 'stable' branch can be found at: https://github.com/kieker-monitoring/kieker/treeblob/stable/bin/dev/snap-ci
Pipeline on Snap-CI: https://snap-ci.com/github_repositories/kieker-monitoring/kieker/pulls
Master to stable
Executed for each commit into the master
(possible via a pull request only). The final stage of the pipeline is a push to the stable
branch.
Stages:
- All stages from
Pull request
- Detailed tests of the release archives
Pipeline on Snap-CI: https://snap-ci.com/kieker-monitoring/kieker/branch/masterJenkinsfile
The figure below describes the most important aspects of the build steps (attached, you can find the figure as svg and source file (dia)):
Pull Request (PR)
Whenever a branch should be integrated into the main development branch of Kieker, it is required to create a pull request towards the 'master' branch. To get a branch merged into the 'master', all automated checks (i.e., branch build, PR build) need to be successful and there needs to be at least one positive review by another developer. If the requirements are met, one of the Kieker developers can merge the branch into 'master'.
From 'master' to 'stable'
Whenever a commit is made to the 'master' branch (e.g., due to a PR towards 'master'), a new build is triggered in Jenkins. This build executes all build steps again to ensure that all requirements are met. If this is the case, the last two steps of that build push the current state in 'master' to the 'stable' branch and upload a snapshot of the artifacts to MavenCentral.
Feature branch
A pipeline for a branch is instantiated for each branch with a prefix issueprefix KIEKER- (e.g., issueKIEKER-1432)
and triggered for each subsequent commit.
Stages: Same as Master to stable
as 'master'
to 'stable'
except for the final push.
Example pipeline on Snap-CI: https://snap-ci.com/kieker-monitoring/kieker/branch/issue-1432
Nightly release
Executed each night based on the stable
branch.
...
Stages: Corresponds to Master to stable
Release (candidate) artifacts are available via https://build.se.informatik.uni-kiel.de/jenkins/job/kieker-RC-release/ws/build/
Pipeline on Jenkins (deactivated during non-release periods): https://build.se.informatik.uni-kiel.de/jenkins/job/kieker-RC-release/
Kieker Build Docker Containers
As Snap-CI supports Docker, we created Docker containers to have a reproducible build environment.
The repository containing all the Dockerfile files: https://github.com/kieker-monitoring-docker/kieker-build
...
kieker/kieker-build:base
(Base image for all other containers based on Ubuntu 15.10 and the additional R dependencies)kieker/kieker-build:openjdk6
(Based on :base with openjdk-6 installed)kieker/kieker-build:openjdk7
(Based on :base with openjdk-7 installed)kieker/kieker-build:openjdk8
(Based on :base with openjdk-8 installed)kieker/kieker-build:snap-ci-build
(Based on :openjdk6, assuming that the kieker repository to build is mapped to /opt/kieker inside the container and executes the Gradle wrapper with thebuild task
by default)
To execute it locally:sudo docker run -t -i -v /path/to/kieker/repo:/opt/kieker kieker/kieker-build:snap-ci-build
- kieker/kieker-build:snap-ci-nightly (Based on :openjdk6, assuming that the kieker repository to build is mapped to /opt/kieker inside the container and executes the Gradle wrapper with the
jenkinsNightlyBuild
task by default. In addition to the :snap-ci-build container, this container has all packages installed that are needed to run the nightly build; e.g., pdflatex, bibtex, fonts for documentation generation)
To execute it locally:sudo docker run -t -i -v /path/to/kieker/repo:/opt/kieker kieker/kieker-build:snap-ci-nightly
Some Todos
Pipeline template not only for the Kieker core but also for other projects in the "Kieker orbit"
...
- Insert the call of the check-script (in the stage around the acceptance test?)
- Merge the Gradle threshold code into master to be able to have quality gates for code analysis
- Think about a way for continuous build numbering without breaking sonatype/maven conventions (we could use the build numbering in snap-ci to do so)