From d28f48e7077a55973ce075c5a6e86e9346229da1 Mon Sep 17 00:00:00 2001 From: Yuxiang Zhu Date: Mar 04 2019 15:42:06 +0000 Subject: CI/CD: Install deps from ./requirements.txt before running unit tests Generally new dependencies added to waiverdb.spec are not installed to C3I Jenkins slave pod because of the limitation of OpenShift that no root access to pod. To apply the new set of dependencies, we have to rebuild the Jenkins slave pod image after the new waiverdb.spec is merged to master. This PR tries to mitigate this issue by installing additional PyPI dependencies to user directory `pip3 install --user -r ./requirements.txt`. This shouldn't have side effect because it doesn't update RPM installed packages unless `-U` is specified. --- diff --git a/openshift/pipelines/templates/waiverdb-dev.Jenkinsfile b/openshift/pipelines/templates/waiverdb-dev.Jenkinsfile index 4314d0b..d666aa2 100644 --- a/openshift/pipelines/templates/waiverdb-dev.Jenkinsfile +++ b/openshift/pipelines/templates/waiverdb-dev.Jenkinsfile @@ -94,6 +94,7 @@ pipeline { env.TEMP_TAG = env.WAIVERDB_CONTAINER_VERSION + '-jenkins-' + currentBuild.id } sh 'cp conf/settings.py.example conf/settings.py' + sh 'pip3 install --user -r ./requirements.txt' } } stage('Run checks') {