Drop the ref from the tag fetch in GGP
If you start with an out of date repo (we do -- we clone from cached git repos on our images) and the git remote update fails (eg due to mirror sync issues) and you then do a fetch with a ref argument (eg refs/tags/foo), it will fail with: error: no such remote ref refs/tags/foo However, git fetch --tags will get all the tags from the zuul merger, which is what we really care about, and the subsequent checkout and reset will make sure that we really did get the tag we wanted. Therefore, remove the ref argument that can cause these occasional failures. Change-Id: Iaed8b82204a3eddc7ee418ebe94637f2a371d25b
This commit is contained in:
parent
cd7a3b964b
commit
5f12e27897
@ -71,7 +71,7 @@ fi
|
||||
|
||||
if echo "$ZUUL_REF" | grep -q ^refs/tags/
|
||||
then
|
||||
git fetch --tags $ZUUL_URL/$ZUUL_PROJECT $ZUUL_REF
|
||||
git fetch --tags $ZUUL_URL/$ZUUL_PROJECT
|
||||
git checkout $ZUUL_REF
|
||||
git reset --hard $ZUUL_REF
|
||||
elif [ -z "$ZUUL_NEWREV" ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user