From: Anil Belur Date: Fri, 25 Mar 2022 00:43:03 +0000 (+1000) Subject: Fix: Activate the virtual environment X-Git-Tag: v0.75.1^0 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=8b1e8a7f02cbf2a43c038cd319077b67e3d39a93;p=releng%2Fglobal-jjb.git Fix: Activate the virtual environment Install Python to make sure its available on all images. Issue-ID: RELENG-4182 Change-Id: Ic8900474fdfd4ce1bdaeecc1e80fef74ca6538f7 Signed-off-by: Anil Belur --- diff --git a/releasenotes/notes/enable-virtual-env-a799923d70578489.yaml b/releasenotes/notes/enable-virtual-env-a799923d70578489.yaml new file mode 100644 index 00000000..f3d63372 --- /dev/null +++ b/releasenotes/notes/enable-virtual-env-a799923d70578489.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Activate the virtual environment. Python may not be available by default + on all versions. diff --git a/shell/capture-instance-metadata.sh b/shell/capture-instance-metadata.sh index 0998dd1a..0648d1dd 100644 --- a/shell/capture-instance-metadata.sh +++ b/shell/capture-instance-metadata.sh @@ -11,6 +11,11 @@ echo "---> capture-instance-metadata.sh" +# shellcheck disable=SC1090 +source ~/lf-env.sh + +lf-activate-venv --python python3.8 lftools + # detect if we're in EC2 if [ -n "${NOMAD_DC}" ]; then echo "INFO: Running in Nomad, no metadata"