Jenkins build verification jobs¶
We are building the various Osmocom projects when patches get posted to Gerrit for review and when patches have been merged to the
The jenkins-job-builder configuration files are in
- Change in
master/Gerrit triggers a one of the jobs generated by
- Jenkins triggers a new job and waits until it completes (example, you get there from the previous example by clicking the "master-osmo-bsc..." link and opening the job from the build history on the left with the same ID as the previous link has: 4300)
- This job most likely runs
contrib/jenkins.shof the git repository in question. There are some variations of this, depending on the repository (e.g. using Docker, see below). Look for the repository name in the appropriate
.ymlconfig file for details.
contrib/jenkins.shtypically builds the source code and runs the unit tests.
Some jobs do not run directly on a Jenkins buildbot, but instead inside a Docker container. That is due to the VTY tests, in order to be able to run them several times in parallel.
The entry for
gerrit-verification.yml looks like this for example:
- osmo-bsc: cmd: | docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build -i -u build \ -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ osmocom:amd64 /build/contrib/jenkins.shThe Docker image is
osmocom:amd64. All of the build verification jobs, that are using Docker, use this image. The
Dockerfile_osmocom_jenkins.amd64is located in
osmo-ci.git/docker. Rebuilding it works as follows:
- update-osmo-ci-on-slaves (
update-osmo-ci-on-slaves.yml) gets triggered on changes in
If you are modifying the Dockerfile mentioned above, it is a good idea to check locally if your changes work as intended. Run
docker/rebuild_osmocom_jenkins_image.sh first, then a script like the following. Adjust the paths and project as necessary.
#!/bin/sh -xe export PARALLEL_MAKE=-j5 CISCRIPTS=/home/user/code/osmo-dev/src/osmo-ci/scripts cd ~/code/osmo-dev/src/osmo-bsc docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build -i -u build \ -v "$PWD:/build" -v "$CISCRIPTS:/build_bin" \ osmocom:amd64 /build/contrib/jenkins.sh