corrected checkout of xenadmin.hg when it does not exists.

This commit is contained in:
Sorin Sbarnea 2013-07-02 13:30:31 +01:00
parent 71882d15b2
commit dc84e81662
2 changed files with 8 additions and 13 deletions

View File

@ -47,19 +47,6 @@ fi
set -e
ROOT_DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd )"
cd ${ROOT_DIR}
#DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# now we are sure we are running from the branch root
#cd ${DIR}/../..
if [ -d "xenadmin-ref.hg" ]
then
hg --cwd xenadmin-ref.hg pull -u
else
hg clone ssh://xenhg@hg.uk.xensource.com/carbon/${XS_BRANCH}/xenadmin-ref.hg/
fi
production_jenkins_build()
{

View File

@ -89,6 +89,14 @@ fi
XS_BRANCH=`cd $DIR;git config --get remote.origin.url|sed -e 's@.*carbon/\(.*\)/xenadmin.git.*@\1@'`
echo Running on branch: $XS_BRANCH
cd ${ROOT_DIR}
if [ -d "xenadmin-ref.hg" ]
then
hg --cwd xenadmin-ref.hg pull -u
else
hg clone ssh://xenhg@hg.uk.xensource.com/carbon/${XS_BRANCH}/xenadmin-ref.hg/
fi
#rename Jenkins environment variables to distinguish them from ours; remember to use them as get only
get_JOB_NAME=${JOB_NAME}
get_BUILD_NUMBER=${BUILD_NUMBER}