Merge "fix(ci): Install python3 package first" into stable/wallaby

This commit is contained in:
Zuul 2022-01-20 15:07:42 +00:00 committed by Gerrit Code Review
commit 9f942d58f4
2 changed files with 5 additions and 2 deletions

View File

@ -748,6 +748,7 @@ To use this script execute the following command.
.. code-block:: console
$ cd tripleo-validations
$ ./scripts/run-local-test ${NEWROLENAME}
When using the `run-local-test` script, the TRIPLEO_JOB_ANSIBLE_ARGS

View File

@ -40,12 +40,11 @@ set -xeuo
# Source distribution information
source /etc/os-release || source /usr/lib/os-release
RHT_PKG_MGR=$(command -v dnf || command -v yum)
PYTHON_EXEC=$(command -v python3 || command -v python)
# Install the one requirement we need to run any local test
case "${ID,,}" in
amzn|rhel|centos|fedora)
sudo "${RHT_PKG_MGR}" install -y python*-virtualenv
sudo "${RHT_PKG_MGR}" install -y python3 python*-virtualenv
;;
esac
@ -53,6 +52,9 @@ esac
sudo mkdir -p /etc/ci
sudo touch /etc/ci/mirror_info.sh
# Get Python Executable
PYTHON_EXEC=$(command -v python3 || command -v python)
# Create a virtual env
"${PYTHON_EXEC}" -m virtualenv --system-site-packages "${HOME}/test-python"