From 5a141c25f6048fbb8a0d659ce6e81cabc2eb5c3f Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Fri, 10 May 2019 12:42:45 +0100 Subject: [PATCH] Ensure that TESTING_BRANCH is exported In order for Ansible to consume the env var, it needs to be exported. Without the export, TESTING_BRANCH is not set and test-vars.yml results in defaulting to 'master' which is not appropriate for stable branches. This patch is s stop-gap to unblock testing for stable/stein. Another patch will follow which will force any tests using this mechanism to fail if the env var is not set. Change-Id: I1ff58205c2c0346dfe1744fdf3921b9db03c2774 --- test-ansible-env-prep.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test-ansible-env-prep.sh b/test-ansible-env-prep.sh index 63212801..950ff30c 100755 --- a/test-ansible-env-prep.sh +++ b/test-ansible-env-prep.sh @@ -50,9 +50,9 @@ ZUUL_PLUGINS_CLONE_LOCATION="/home/zuul/src/opendev.org/openstack/openstack-ansi # Use .gitreview as the key to determine the appropriate # branch to clone for tests. -TESTING_BRANCH=$(awk -F'=' '/defaultbranch/ {print $2}' "${WORKING_DIR}/.gitreview") +export TESTING_BRANCH=$(awk -F'=' '/defaultbranch/ {print $2}' "${WORKING_DIR}/.gitreview") if [[ "${TESTING_BRANCH}" == "" ]]; then - TESTING_BRANCH="master" + export TESTING_BRANCH="master" fi # Use pip opts to add options to the pip install command. @@ -60,6 +60,7 @@ fi export PIP_OPTS=${PIP_OPTS:-""} echo "TESTING_HOME: ${TESTING_HOME}" +echo "TESTING_BRANCH: ${TESTING_BRANCH}" echo "WORKING_DIR: ${WORKING_DIR}" echo "ROLE_NAME: ${ROLE_NAME}" echo "ANSIBLE_INVENTORY: ${ANSIBLE_INVENTORY}"