Replace deprecated UPPER_CONSTRAINTS_FILE variable

UPPER_CONSTRAINTS_FILE is old name and deprecated

[1] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file

Change-Id: Ieb09cd19a88453e21c079541a5daa1dc5df3ffa9
This commit is contained in:
likui 2021-05-17 16:38:52 +08:00 committed by Dmitriy Rabotyagov
parent 82e3d013fe
commit faa408159d
4 changed files with 8 additions and 8 deletions

View File

@ -109,17 +109,17 @@ fi
PYTHON_EXEC_PATH="${PYTHON_EXEC_PATH:-$(which python3)}"
# 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
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
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
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
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
build_ansible_runtime_venv

View File

@ -234,7 +234,7 @@ if [[ "${ACTION}" == "upgrade" ]]; then
# script to allow newer versions of Ansible and global
# requirements to be installed.
unset ANSIBLE_PACKAGE
unset UPPER_CONSTRAINTS_FILE
unset TOX_CONSTRAINTS_FILE
unset PIP_OPTS
unset UPGRADE_TARGET_BRANCH

View File

@ -68,7 +68,7 @@ function build_ansible_runtime_venv {
# The vars used to prepare the Ansible runtime venv
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,
# making sure to completely ignore any config already on the host. This is to

View File

@ -8,7 +8,7 @@ ignore_basepython_conflict = True
usedevelop = True
basepython = python3
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 =
-r{toxinidir}/global-requirement-pins.txt
-r{toxinidir}/test-requirements.txt