fix(ci): Install python3 package first
The run-local-test script is intended to be executed on a CentOS 8 machine. In case of a minimal installation, only the internal Python interpreter is installed (/usr/libexec/platform-python). This patch makes sure that the Python 3 package is installed first. JIRA: #VALFRWK-701 Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com> Change-Id: I333464bea2917de17b5b87ba9e5f109cb400cf15
This commit is contained in:
parent
dd088d7a77
commit
772d98cf24
@ -754,6 +754,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
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user