Merge "Replace deprecated UPPER_CONSTRAINTS_FILE variable"
This commit is contained in:
commit
f01fd69876
@ -109,17 +109,17 @@ fi
|
|||||||
PYTHON_EXEC_PATH="${PYTHON_EXEC_PATH:-$(which python3)}"
|
PYTHON_EXEC_PATH="${PYTHON_EXEC_PATH:-$(which python3)}"
|
||||||
|
|
||||||
# Obtain the SHA of the upper-constraints to use for the ansible runtime venv
|
# Obtain the SHA of the upper-constraints to use for the ansible runtime venv
|
||||||
UPPER_CONSTRAINTS_SHA=$(awk '/requirements_git_install_branch:/ {print $2}' playbooks/defaults/repo_packages/openstack_services.yml)
|
TOX_CONSTRAINTS_SHA=$(awk '/requirements_git_install_branch:/ {print $2}' playbooks/defaults/repo_packages/openstack_services.yml)
|
||||||
|
|
||||||
# if we are in CI, grab the u-c file from the locally cached repo, otherwise download
|
# if we are in CI, grab the u-c file from the locally cached repo, otherwise download
|
||||||
UPPER_CONSTRAINTS_PATH="/opt/ansible-runtime-constraints-${UPPER_CONSTRAINTS_SHA}.txt"
|
TOX_CONSTRAINTS_PATH="/opt/ansible-runtime-constraints-${TOX_CONSTRAINTS_SHA}.txt"
|
||||||
if [[ -z "${ZUUL_SRC_PATH+defined}" ]]; then
|
if [[ -z "${ZUUL_SRC_PATH+defined}" ]]; then
|
||||||
wget ${UPPER_CONSTRAINTS_FILE:-"https://opendev.org/openstack/requirements/raw/${UPPER_CONSTRAINTS_SHA}/upper-constraints.txt"} -O ${UPPER_CONSTRAINTS_PATH}
|
wget ${TOX_CONSTRAINTS_FILE:-"https://opendev.org/openstack/requirements/raw/${TOX_CONSTRAINTS_SHA}/upper-constraints.txt"} -O ${TOX_CONSTRAINTS_PATH}
|
||||||
else
|
else
|
||||||
git --git-dir=${ZUUL_SRC_PATH}/opendev.org/openstack/requirements/.git show ${UPPER_CONSTRAINTS_SHA}:upper-constraints.txt > ${UPPER_CONSTRAINTS_PATH}
|
git --git-dir=${ZUUL_SRC_PATH}/opendev.org/openstack/requirements/.git show ${TOX_CONSTRAINTS_SHA}:upper-constraints.txt > ${TOX_CONSTRAINTS_PATH}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export UPPER_CONSTRAINTS_FILE="file://${UPPER_CONSTRAINTS_PATH}"
|
export TOX_CONSTRAINTS_FILE="file://${TOX_CONSTRAINTS_PATH}"
|
||||||
|
|
||||||
if [[ -z "${SKIP_OSA_RUNTIME_VENV_BUILD+defined}" ]]; then
|
if [[ -z "${SKIP_OSA_RUNTIME_VENV_BUILD+defined}" ]]; then
|
||||||
build_ansible_runtime_venv
|
build_ansible_runtime_venv
|
||||||
|
@ -234,7 +234,7 @@ if [[ "${ACTION}" == "upgrade" ]]; then
|
|||||||
# script to allow newer versions of Ansible and global
|
# script to allow newer versions of Ansible and global
|
||||||
# requirements to be installed.
|
# requirements to be installed.
|
||||||
unset ANSIBLE_PACKAGE
|
unset ANSIBLE_PACKAGE
|
||||||
unset UPPER_CONSTRAINTS_FILE
|
unset TOX_CONSTRAINTS_FILE
|
||||||
unset PIP_OPTS
|
unset PIP_OPTS
|
||||||
unset UPGRADE_TARGET_BRANCH
|
unset UPGRADE_TARGET_BRANCH
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ function build_ansible_runtime_venv {
|
|||||||
|
|
||||||
# The vars used to prepare the Ansible runtime venv
|
# The vars used to prepare the Ansible runtime venv
|
||||||
PIP_OPTS+=" --constraint global-requirement-pins.txt"
|
PIP_OPTS+=" --constraint global-requirement-pins.txt"
|
||||||
PIP_OPTS+=" --constraint ${UPPER_CONSTRAINTS_FILE}"
|
PIP_OPTS+=" --constraint ${TOX_CONSTRAINTS_FILE}"
|
||||||
|
|
||||||
# When executing the installation, we want to specify all our options on the CLI,
|
# When executing the installation, we want to specify all our options on the CLI,
|
||||||
# making sure to completely ignore any config already on the host. This is to
|
# making sure to completely ignore any config already on the host. This is to
|
||||||
|
2
tox.ini
2
tox.ini
@ -8,7 +8,7 @@ ignore_basepython_conflict = True
|
|||||||
usedevelop = True
|
usedevelop = True
|
||||||
basepython = python3
|
basepython = python3
|
||||||
install_command =
|
install_command =
|
||||||
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/upper-constraints.txt} {opts} {packages}
|
pip install -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/global-requirement-pins.txt
|
-r{toxinidir}/global-requirement-pins.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user