From 308b3a3a5db9188fe9a83493f273ec279225465d Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Tue, 10 Nov 2015 17:47:00 +0100 Subject: [PATCH] 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 fixes the issue for stable/liberty periodic jobs for neutron-vpnaas when we tried to validate it against neutron/master. Change-Id: I360239a1443f8d4e16210a1ef743912e1bf85f41 --- tools/tox_install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tox_install.sh b/tools/tox_install.sh index 2d35448dc..299bef75a 100755 --- a/tools/tox_install.sh +++ b/tools/tox_install.sh @@ -30,6 +30,7 @@ elif [ $neutron_installed -eq 0 ]; then location=$(python -c "import neutron; print(neutron.__file__)") echo "ALREADY INSTALLED at $location" elif [ -x "$ZUUL_CLONER" ]; then + export ZUUL_BRANCH=${ZUUL_BRANCH-$BRANCH} echo "USING ZUUL CLONER to obtain Neutron code" cwd=$(/bin/pwd) cd /tmp