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
This commit is contained in:
James E. Blair
2012-11-06 17:22:27 +01:00
parent 1ac23266d8
commit 218af07b88

View File

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