Fix: Activate the virtual environment 17/69917/5 v0.75.1
authorAnil Belur <abelur@linuxfoundation.org>
Fri, 25 Mar 2022 00:43:03 +0000 (10:43 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Fri, 25 Mar 2022 03:13:21 +0000 (13:13 +1000)
Install Python to make sure its available on all images.

Issue-ID: RELENG-4182
Change-Id: Ic8900474fdfd4ce1bdaeecc1e80fef74ca6538f7
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
releasenotes/notes/enable-virtual-env-a799923d70578489.yaml [new file with mode: 0644]
shell/capture-instance-metadata.sh

diff --git a/releasenotes/notes/enable-virtual-env-a799923d70578489.yaml b/releasenotes/notes/enable-virtual-env-a799923d70578489.yaml
new file mode 100644 (file)
index 0000000..f3d6337
--- /dev/null
@@ -0,0 +1,5 @@
+---
+fixes:
+  - |
+    Activate the virtual environment. Python may not be available by default
+    on all versions.
index 0998dd1..0648d1d 100644 (file)
 
 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"