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
This commit is contained in:
Jesse Pretorius 2019-05-10 12:42:45 +01:00
parent 4bf4ec3c18
commit 5a141c25f6

View File

@ -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}"