Merge "Replace deprecated UPPER_CONSTRAINTS_FILE variable"

This commit is contained in:
Zuul 2021-06-01 14:31:54 +00:00 committed by Gerrit Code Review
commit f01fd69876
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