Clear workspace before cloning in GGP.
* modules/jenkins/files/slave_scripts/gerrit-git-prep.sh: The git-clone subcommand fails spectacularly when its destination is set to a non-empty directory. In the case of gerrit-git-prep this can happen when files are left behind in a workspace with no .git tree, and then the job is changed to run GGP later. Work around it by forcibly removing any previous workspace contents before cloning, but show a listing of any contents first for the benefit of troubleshooting such situations. Change-Id: I0662ee68ee2a0e7a66a4d85c8cc7aea8bf0c17c0
This commit is contained in:
parent
b71a3e9315
commit
edfc75e027
@ -29,6 +29,8 @@ fi
|
|||||||
set -x
|
set -x
|
||||||
if [[ ! -e .git ]]
|
if [[ ! -e .git ]]
|
||||||
then
|
then
|
||||||
|
ls -a
|
||||||
|
rm -fr .[^.]* *
|
||||||
git clone $GERRIT_SITE/p/$ZUUL_PROJECT .
|
git clone $GERRIT_SITE/p/$ZUUL_PROJECT .
|
||||||
fi
|
fi
|
||||||
git remote set-url origin $GERRIT_SITE/p/$ZUUL_PROJECT
|
git remote set-url origin $GERRIT_SITE/p/$ZUUL_PROJECT
|
||||||
|
Loading…
Reference in New Issue
Block a user