Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
The
jenkinsci/packaging
repository accepts pull requests, but theJenkinsfile
does not run the tests in CI. As a result the packages are at high risk of regression (jenkinsci/packaging#235). To solve this problem, I have proposed jenkinsci/packaging#240 to add test coverage for the packages in theJenkinsfile
. That PR, on @dduportal's suggestion, runs this workload on the VM agents available onci.jenkins.io
by using thedocker
label.Problem
The VM agents available on
ci.jenkins.io
lack the packages needed to run Python jobs, including Ansible/Molecule tests. I was able to work around this in jenkinsci/packaging#240 by adding the following shell script to my Jenkins job:sudo apt-get update && sudo apt-get install -y python3-docker python3-pip python3-venv
However, this is slow and fragile. Better would be to have these packages backed into the base image.
Solution
Install these packages as part of the base image.
Testing Done
Ran the job from jenkinsci/packaging#240 with the abovementioned workaround and verified that Ansible/Molecule tests passed.