Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Python 3 #167

Merged
merged 2 commits into from
Jan 18, 2022
Merged

Install Python 3 #167

merged 2 commits into from
Jan 18, 2022

Conversation

basil
Copy link
Contributor

@basil basil commented Jan 18, 2022

Context

The jenkinsci/packaging repository accepts pull requests, but the Jenkinsfile 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 the Jenkinsfile. That PR, on @dduportal's suggestion, runs this workload on the VM agents available on ci.jenkins.io by using the docker 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.

@timja timja requested a review from dduportal January 18, 2022 16:34
Copy link
Contributor

@dduportal dduportal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cooool, many thanks @basil !

@dduportal dduportal added the enhancement New feature or request label Jan 18, 2022
auto-merge was automatically disabled January 18, 2022 16:58

Head branch was pushed to by a user without write access

Copy link
Contributor

@dduportal dduportal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(re-approving for wheel ;) )

@dduportal dduportal merged commit d109a14 into jenkins-infra:main Jan 18, 2022
@basil basil deleted the python branch January 18, 2022 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants