Correct test for zuulifying the tree
The new zuulification of old requires that we know that we are on the branch which corresponds to the old change. This means that instead of having a flag to setup_workspace about whether we are supposed to set it up, we instead need a check to ensure that it's actually the ZUUL_BRANCH. The previous attempt at this failed because the condition was too nested because I didn't not fully understand the complexity of the multilevel, multiply segmented, if condition that this was attempted to be inserted into. By fully extracting it one level this should be correct. Change-Id: Ie787de3cb0b42b6b53b149dd528e0a20aae5c328
This commit is contained in:
@@ -42,7 +42,6 @@ function git_checkout {
|
||||
function setup_workspace {
|
||||
local branch=$1
|
||||
local DEST=$2
|
||||
local CHECKOUT_ZUUL=$3
|
||||
|
||||
# Enabled detailed logging, since output of this function is redirected
|
||||
set -o xtrace
|
||||
@@ -128,10 +127,9 @@ function setup_workspace {
|
||||
fi
|
||||
|
||||
# See if we should check out a Zuul ref
|
||||
if [ $CHECKOUT_ZUUL -eq "1" ]; then
|
||||
if [ "$ZUUL_BRANCH" == "$branch" ]; then
|
||||
# See if Zuul prepared a ref for this project
|
||||
if { [ "$ZUUL_BRANCH" == "$branch" ] && \
|
||||
[ "$OVERRIDE_ZUUL_REF" != "" ] && \
|
||||
if { [ "$OVERRIDE_ZUUL_REF" != "" ] && \
|
||||
git fetch $ZUUL_URL/$PROJECT $OVERRIDE_ZUUL_REF ; } || \
|
||||
{ [ "$ZUUL_REF" != "" ] && \
|
||||
git fetch $ZUUL_URL/$PROJECT $ZUUL_REF ; } || \
|
||||
@@ -509,10 +507,10 @@ ip -f inet addr show
|
||||
setup_host &> $WORKSPACE/logs/devstack-gate-setup-host.txt
|
||||
|
||||
if [ "$DEVSTACK_GATE_GRENADE" -eq "1" -o "$DEVSTACK_GATE_GRENADE_FORWARD" -eq "1" ]; then
|
||||
setup_workspace $GRENADE_NEW_BRANCH $BASE/new 1 &> \
|
||||
setup_workspace $GRENADE_NEW_BRANCH $BASE/new &> \
|
||||
$WORKSPACE/logs/devstack-gate-setup-workspace-new.txt
|
||||
else
|
||||
setup_workspace $ZUUL_BRANCH $BASE/new 1 &> \
|
||||
setup_workspace $ZUUL_BRANCH $BASE/new &> \
|
||||
$WORKSPACE/logs/devstack-gate-setup-workspace-new.txt
|
||||
fi
|
||||
|
||||
@@ -530,7 +528,7 @@ fi
|
||||
# able to do a single project, only devstack_gate, and have all the rest of
|
||||
# setup_workspace happen after it.
|
||||
if [ "$DEVSTACK_GATE_GRENADE" -eq "1" -o "$DEVSTACK_GATE_GRENADE_FORWARD" -eq "1" ]; then
|
||||
setup_workspace $GRENADE_OLD_BRANCH $BASE/old 0 &> \
|
||||
setup_workspace $GRENADE_OLD_BRANCH $BASE/old &> \
|
||||
$WORKSPACE/logs/devstack-gate-setup-workspace-old.txt
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user