Skip to content

Commit 4a6a717

Browse files
author
Ghanshyam
committed
Support TEMPEST_BRANCH with tag name & stable u-c
TEMPEST_BRANCH which is mostly set as master so that Tempest master is run to test the env. With stable branch going to EM state and Tempest master might not work due to incompatibility of code or requirements. In that case we pin the Tempest so that older Tempest can be used for their testing. Till now for ocata, pike and, queens we used the gerrit style ref to pin the Tempest which is not preferred way. We should be able to use the tag name on TEMPEST_BRANCH. This commit explicitly checkout the tag set in TEMPEST_BRANCH as git_clone does not checkout the tag directly until RECLONE is true or tempest dir does not exist. After this stable branch or job can set the tag directly with name. For exmaple: TEMPEST_BRANCH=23.0.0. Also use the stable/ocata upper constraint in Tempest venv. Related--Bug: 1861308 [1] https://review.opendev.org/#/c/704840/ Change-Id: I15942917ec96e0f0e17639ea3296e356cdfeb832
1 parent a70d84c commit 4a6a717

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

‎lib/tempest‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,17 @@ function install_tempest {
647647
git_clone $TEMPEST_REPO $TEMPEST_DIR $TEMPEST_BRANCH
648648
pip_install tox
649649
pushd $TEMPEST_DIR
650+
# NOTE(gmann): checkout the TEMPEST_BRANCH in case TEMPEST_BRANCH
651+
# is tag name not master. git_clone would not checkout tag because
652+
# TEMPEST_DIR already exist until RECLONE is true.
653+
git checkout $TEMPEST_BRANCH
654+
655+
# NOTE(gmann): Use branch constraint because Tempest is pinned to the branch release
656+
# instead of using master. We need to export it via env var UPPER_CONSTRAINTS_FILE
657+
# so that initial creation of tempest tox use stable branch constraint
658+
# instead of master constraint as defined in tempest/tox.ini
659+
export UPPER_CONSTRAINTS_FILE=$REQUIREMENTS_DIR/upper-constraints.txt
660+
650661
tox --notest -efull
651662
# NOTE(mtreinish) Respect constraints in the tempest full venv, things that
652663
# are using a tox job other than full will not be respecting constraints but

‎stackrc‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,10 @@ REQUIREMENTS_REPO=${REQUIREMENTS_REPO:-${GIT_BASE}/openstack/requirements.git}
267267
REQUIREMENTS_BRANCH=${REQUIREMENTS_BRANCH:-stable/ocata}
268268

269269
# Tempest test suite
270-
TEMPEST_REPO=${TEMPEST_REPO:-https://review.opendev.org/openstack/tempest}
271-
# Use Tempest commit (for tag 20.0.0) which is Ocata supported version.
270+
TEMPEST_REPO=${TEMPEST_REPO:-${GIT_BASE}/openstack/tempest.git}
271+
# Use Tempest tag 20.0.0 which is ocata supported version.
272272
# https://docs.openstack.org/releasenotes/tempest/v20.0.0.html
273-
# https://github.com/openstack/tempest/commit/a955095f8369e2e15c97a536edc1a9c077208129
274-
TEMPEST_BRANCH=${TEMPEST_BRANCH:-refs/changes/71/645471/2}
275-
273+
TEMPEST_BRANCH=${TEMPEST_BRANCH:-20.0.0}
276274

277275
##############
278276
#

0 commit comments

Comments
 (0)