#253 CI/CD: Install build dependencies at runtime
Merged by lholecek. Opened by rayson.
rayson/waiverdb cicd-install-builddeps-at-runtime  into  master

Download 253.patch

Following https://pagure.io/waiverdb/pull-request/249.

When you add more build dependencies to waiverdb.spec in a PR,
the RPM build test will fail because they are not present in the
Jenkins slave image. This PR adds the ability to install build
dependencies at runtime.

I am not sure if it worth allowing to run sudo in the jenkins slave pod. If this is not desirable, please close this PR.
Without this PR, new build deps must be added to openshift/containers/jenkins-slave/Dockerfile then rebuild the image before the pipeline run.

Running oc start-build waiverdb-dev-jenkins-slave within waiver-test project to rebuild the jenkins slave image from master branch.

Without this, I think there no way to fix CI for a PR where build dependencies change in spec file.

I'm ok with merging this

+1 OK, lets merge this now.

Commit 8d196e75 fixes this pull-request

Pull-Request has been merged by lholecek

Pull-Request has been merged by lholecek

Thanks for the review. oc start-build waiverdb-dev-jenkins-slave still need to be run to rebuild the image.

@lholecek My mistake. This PR will not work on UpShift.

I did try running sudo on OpenShift and found it worked (maybe I logged into another cluster with looser policy applied?). But on UpShift Prod it is not allowed to run setuid programs (including sudo). So please revert this change.

Just as sochotni said yesterday: Dependencies rarelly change. We could introduce some manual operations to deal with that. So let's just rebuild the Jenkins slave image with new dependencies.

@rayson Reverted. Thanks for updating the image.

Metadata