From 218af07b88c373dff935ddd6f679b3db6be3cd7e Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Tue, 6 Nov 2012 17:22:27 +0100 Subject: [PATCH] If there is no ZUUL_REF, don't fetch it. Periodic jobs don't get a ZUUL_REF, so don't try to check it out, just fall back to checking otu the branch. Change-Id: Id2769d70800a03ccf49012c6f3fce14cffec9671 --- devstack-vm-gate-wrap.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index b665e534..c9b65b68 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -120,7 +120,8 @@ function setup_workspace { fi # See if Zuul prepared a ref for this project - if git fetch https://review.openstack.org/p/$PROJECT $ZUUL_REF; then + if [ "$ZUUL_REF" != "" ] && \ + git fetch https://review.openstack.org/p/$PROJECT $ZUUL_REF; then # It's there, so check it out. git checkout FETCH_HEAD git reset --hard FETCH_HEAD