From 21c448b4cbfcf712a1cbcb67903c624adeacc435 Mon Sep 17 00:00:00 2001 From: Ghanshyam Date: Wed, 29 Jan 2020 15:39:17 -0600 Subject: [PATCH] Support TEMPEST_BRANCH with tag name 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 replace gerrit style Tempest ref to tag to make this change working. Change-Id: Ic777e4b56c4932dde135ac909cb5c6f4a7d5cc78 --- lib/tempest | 5 +++++ stackrc | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/tempest b/lib/tempest index 84e58a6038..2202bfd7e1 100644 --- a/lib/tempest +++ b/lib/tempest @@ -660,6 +660,11 @@ function install_tempest { git_clone $TEMPEST_REPO $TEMPEST_DIR $TEMPEST_BRANCH pip_install 'tox!=2.8.0' pushd $TEMPEST_DIR + # NOTE(gmann): checkout the TEMPEST_BRANCH in case TEMPEST_BRANCH + # is tag name not master. git_clone would not checkout tag because + # TEMPEST_DIR already exist until RECLONE is true. + git checkout $TEMPEST_BRANCH + tox -r --notest -efull # NOTE(mtreinish) Respect constraints in the tempest full venv, things that # are using a tox job other than full will not be respecting constraints but diff --git a/stackrc b/stackrc index 3b0891c25b..9d7ff35b07 100644 --- a/stackrc +++ b/stackrc @@ -309,11 +309,10 @@ REQUIREMENTS_REPO=${REQUIREMENTS_REPO:-${GIT_BASE}/openstack/requirements.git} REQUIREMENTS_BRANCH=${REQUIREMENTS_BRANCH:-$TARGET_BRANCH} # Tempest test suite -TEMPEST_REPO=${TEMPEST_REPO:-https://review.opendev.org/openstack/tempest} -# Use Tempest commit (for tag 21.0.0) which is Queens supported version. +TEMPEST_REPO=${TEMPEST_REPO:-${GIT_BASE}/openstack/tempest.git} +# Use Tempest tag 21.0.0 which is Queens supported version. # https://docs.openstack.org/releasenotes/tempest/v21.0.0.html -# https://github.com/openstack/tempest/commit/abd07b42ca01319c2e289dc60e0449069e2889df -TEMPEST_BRANCH=${TEMPEST_BRANCH:-refs/changes/99/670699/1} +TEMPEST_BRANCH=${TEMPEST_BRANCH:-21.0.0} ##############