From 8b1e8a7f02cbf2a43c038cd319077b67e3d39a93 Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Fri, 25 Mar 2022 10:43:03 +1000 Subject: [PATCH] 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 --- releasenotes/notes/enable-virtual-env-a799923d70578489.yaml | 5 +++++ shell/capture-instance-metadata.sh | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 releasenotes/notes/enable-virtual-env-a799923d70578489.yaml 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" -- 2.16.6