BUILD: Enables venv for building
Requires the update from dockerfiles to enable venv, and will use the
environment created at build time of the container when running builds.
Change-Id: I94a3f4a4d4691506ba524c4cd8383fcb8f260cea
Signed-off-by: Matthew Dalzell <matthew.dalzell@arm.com>
diff --git a/clone.sh b/clone.sh
index 4ccf1c9..52aea20 100755
--- a/clone.sh
+++ b/clone.sh
@@ -101,6 +101,7 @@
fi
TFM_REFSPEC="${GERRIT_REFSPEC:?}"
TFM_NAME="trusted-firmware-m"
+pip install --no-deps ./trusted-firmware-m/pyproject.toml || true
clone_repo_to_share_folder "${TFM_PROJECT}" "${TFM_NAME}" "${TFM_REFSPEC}"
if [ ! -d "${SHARE_FOLDER}/${TFM_NAME}" ]; then
diff --git a/src/org/trustedfirmware/Gerrit.groovy b/src/org/trustedfirmware/Gerrit.groovy
index 989b7fe..bbfd743 100644
--- a/src/org/trustedfirmware/Gerrit.groovy
+++ b/src/org/trustedfirmware/Gerrit.groovy
@@ -38,10 +38,7 @@
echo Not running for a Gerrit change, skipping vote.
exit 0
fi
- if [ ! -d venv ] ; then
- virtualenv -p \$(which python3) venv
- fi
- . venv/bin/activate
+ . /.venv/bin/activate
pip -q install requests
./tf-m-ci-scripts/jenkins/verify.py --category ${category} --value ${value} --verify-name ${verify_name} --user \$VERIFY_USER
""")
@@ -65,10 +62,7 @@
echo Not running for a Gerrit change, skipping.
exit 0
fi
- if [ ! -d venv ] ; then
- virtualenv -p \$(which python3) venv
- fi
- . venv/bin/activate
+ . /.venv/bin/activate
pip -q install requests
./tf-m-ci-scripts/jenkins/comment.py --comment "${comment}" --user \$GERRIT_USER
""")