Have gerrit-git-prep use git.o.o

It's an optional 3rd argument, so the transition should be graceful.

Change-Id: Id62101fdbc4081f8a6b295f84568d78f8c8cb6e5
This commit is contained in:
James E. Blair 2013-08-19 10:46:06 -07:00
parent e21a532764
commit a73105191b
2 changed files with 11 additions and 3 deletions

View File

@ -2,6 +2,7 @@
GERRIT_SITE=$1 GERRIT_SITE=$1
ZUUL_SITE=$2 ZUUL_SITE=$2
GIT_ORIGIN=$3
if [ -z "$GERRIT_SITE" ] if [ -z "$GERRIT_SITE" ]
then then
@ -15,6 +16,13 @@ then
exit 1 exit 1
fi fi
if [ -z "$GIT_ORIGIN" ]
then
GIT_ORIGIN="$GERRIT_SITE/p"
# git://git.openstack.org/
# https://review.openstack.org/p
fi
if [ -z "$ZUUL_REF" ] if [ -z "$ZUUL_REF" ]
then then
echo "This job may only be triggered by Zuul." echo "This job may only be triggered by Zuul."
@ -31,9 +39,9 @@ if [[ ! -e .git ]]
then then
ls -a ls -a
rm -fr .[^.]* * rm -fr .[^.]* *
git clone $GERRIT_SITE/p/$ZUUL_PROJECT . git clone $GIT_ORIGIN/$ZUUL_PROJECT .
fi fi
git remote set-url origin $GERRIT_SITE/p/$ZUUL_PROJECT git remote set-url origin $GIT_ORIGIN/$ZUUL_PROJECT
git remote update || git remote update # attempt to work around bug #925790 git remote update || git remote update # attempt to work around bug #925790
git reset --hard git reset --hard
git clean -x -f -d -q git clean -x -f -d -q

View File

@ -1,7 +1,7 @@
- builder: - builder:
name: gerrit-git-prep name: gerrit-git-prep
builders: builders:
- shell: "/usr/local/jenkins/slave_scripts/gerrit-git-prep.sh https://review.openstack.org http://zuul.openstack.org" - shell: "/usr/local/jenkins/slave_scripts/gerrit-git-prep.sh https://review.openstack.org http://zuul.openstack.org git://git.openstack.org"
- builder: - builder:
name: coverage name: coverage