Set ZUUL_BRANCH using BRANCH if not available

In most cases, ZUUL_BRANCH is set in gate, but not all the time. One
exception is e.g. periodic stable jobs, where there is no actual patch
to validate, hence no ZUUL_REF or ZUUL_BRANCH is set. In that case, we
need to help zuul-cloner to determine the proper branch to fetch
neutron.

It could be achieved by e.g. hardcoding the branch using --zuul_branch
CLI argument passed into zuul-cloner. In this patch, I instead set
ZUUL_BRANCH to BRANCH that seems to be always present in all kinds of
jobs. It is then used by zuul-cloner to choose the correct branch.

This will be needed in the future when we spin out stable/mitaka and run
stable periodic jobs for neutron-fwaas.

Change-Id: I360239a1443f8d4e16210a1ef743912e1bf85f41
This commit is contained in:
Ihar Hrachyshka 2015-11-10 17:48:42 +01:00
parent 9bb68b262c
commit 18793f62c3
1 changed files with 1 additions and 0 deletions

View File

@ -22,6 +22,7 @@ if [ $neutron_installed -eq 0 ]; then
echo "ALREADY INSTALLED" > /tmp/tox_install.txt
echo "Neutron already installed; using existing package"
elif [ -x "$ZUUL_CLONER" ]; then
export ZUUL_BRANCH=${ZUUL_BRANCH-$BRANCH}
echo "ZUUL CLONER" > /tmp/tox_install.txt
cwd=$(/bin/pwd)
cd /tmp