From d4ddd8a1d7e7213f20ed03f6c7f79525112c4fe1 Mon Sep 17 00:00:00 2001 From: Darragh Bailey Date: Tue, 9 Jun 2015 11:48:52 +0100 Subject: [PATCH] Fall back to git clone if zuul-cloner not available Allow running of the compare test on developer workstations where it is less common for zuul-cloner to be present by falling back to using git clone with a depth of 1 if zuul-cloner is not available. Change-Id: Idedc726bea12fb8862cd9574d9ce17b29011c15f --- tools/run-compare-xml.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/run-compare-xml.sh b/tools/run-compare-xml.sh index 2fbb90916..79edafaf8 100755 --- a/tools/run-compare-xml.sh +++ b/tools/run-compare-xml.sh @@ -22,7 +22,12 @@ mkdir -p .test/old/out mkdir -p .test/new/config mkdir -p .test/new/out cd .test -/usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git git://git.openstack.org/openstack-infra project-config +if [ -e /usr/zuul-env/bin/zuul-cloner ]; +then + /usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git git://git.openstack.org/openstack-infra project-config +else + git clone --depth=1 git://git.openstack.org/openstack-infra/project-config +fi cp project-config/jenkins/jobs/* old/config cp project-config/jenkins/jobs/* new/config cd ..