Merge "eiffel: Fix image name var and set harbor credentials"
[infra/cicd.git] / jjb / infra / jjb-verify.sh
index 2921910b9f4f62c4ab9ef5aba1793e8c528be007..8389ae3d63c88aa5d719abe5b13eeb6501a5abe2 100755 (executable)
@@ -3,6 +3,11 @@ set -o errexit
 set -o nounset
 set -o pipefail
 
+# install required packages
+sudo apt update > /dev/null 2>&1
+sudo apt install -y -q=3 gcc libffi-dev libssl-dev lsb-release libpython3-dev \
+    python3-minimal python3-pip python3-yaml virtualenv
+
 # workaround for https://github.com/pypa/virtualenv/issues/1029
 export PS1=${PS1:-}
 
@@ -10,7 +15,7 @@ cd $WORKSPACE
 echo "Info: Installing OpenStack Jenkins Job Builder (JJB) version $JJB_VERSION from source in venv"
 echo "----------------------------------------------------"
 git clone -q $JJB_GIT_REPO -b $JJB_VERSION > /dev/null 2>&1
-virtualenv .venv -q
+virtualenv -p python3 --quiet --no-site-packages .venv
 source .venv/bin/activate
 cd jenkins-job-builder && pip install -q -r test-requirements.txt -e .
 echo "Info: Installed JJB"
@@ -20,6 +25,6 @@ echo "Info: Proceeding with verifying job templates"
 echo "----------------------------------------------------"
 cd $WORKSPACE
 jenkins-jobs --conf jjb/global/jenkins_jobs.ini --user $JJB_USERNAME --password $JJB_USERTOKEN \
-       test --recursive jjb/
+    test --recursive jjb/
 echo "----------------------------------------------------"
 echo "Info: Done"