Fix tempest upper-constraints

When deploying devstack in a stable branch, the master branch is
available locally only in a CI environment where Zuul prepares all
available branches. For a non-CI deployment we need to stick to using
the remote branch as was the case before [0].

While the situation on the master branch isn't really broken, we apply
the fix here anyway so that future stable branches are created in a
working state.

[0] I5d42ac6b54bf20804d7e5faa39d1289102318b64

Closes-Bug: #1956219
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: Ib7719cb2d48b34db70f885e0afe77d904abba3b5
This commit is contained in:
Dr. Jens Harbott 2022-01-03 15:13:44 +01:00
parent 3155217fb6
commit 2ef4a4c851
No known key found for this signature in database
GPG Key ID: E7862B245C3596B1

View File

@ -119,7 +119,9 @@ function set_tempest_venv_constraints {
local tmp_c local tmp_c
tmp_c=$1 tmp_c=$1
if [[ $TEMPEST_VENV_UPPER_CONSTRAINTS == "master" ]]; then if [[ $TEMPEST_VENV_UPPER_CONSTRAINTS == "master" ]]; then
(cd $REQUIREMENTS_DIR && git show master:upper-constraints.txt) > $tmp_c (cd $REQUIREMENTS_DIR &&
git show master:upper-constraints.txt 2>/dev/null ||
git show origin/master:upper-constraints.txt) > $tmp_c
else else
echo "Using $TEMPEST_VENV_UPPER_CONSTRAINTS constraints in Tempest virtual env." echo "Using $TEMPEST_VENV_UPPER_CONSTRAINTS constraints in Tempest virtual env."
cat $TEMPEST_VENV_UPPER_CONSTRAINTS > $tmp_c cat $TEMPEST_VENV_UPPER_CONSTRAINTS > $tmp_c