Jenkins: Jenkinsfile and procps

At Inmanta we recently switched from gitlab and gitlab-ci to the new github organizations (and their per seat pricing). At the same time, we also switched back from gitlab-ci to Jenkins. Jenkins 2 now has to ability to add your CI config to your repo. We run all of our tests inside a container. It makes it a lot easier to use CentOS 7 on our CI servers, but run our tests inside a Fedora container that has a normal python3. Or, run tests on other operating systems.

It took us a while to get this up and running because of how the Jenkins pipeline plugin uses container. Jenkins starts a container with “cat” as command and does docker exec for the actual CI processes. A normal fedora or centos container will not work, because jekins executes ps to check if the process is still running. When this fails, each CI process was killed after 10s. By default, ps is not installed in the fedora container. Installing procps-ng fixed this.

All examples from CloudBees, use a container with Java, Maven installed and procps installed.