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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user