Set right git branch for rancher-catalog-service (#249)

This commit is contained in:
Dennis Pattmann 2016-08-19 21:40:58 +02:00 committed by Bill Maxwell
parent 3ee0af6280
commit b1f224c4af
2 changed files with 15 additions and 1 deletions

8
scripts/repo.json Normal file
View File

@ -0,0 +1,8 @@
{
"catalogs": {
"library": {
"url": "/scratch",
"branch": "master"
}
}
}

View File

@ -5,6 +5,12 @@ cd $(dirname $0)/..
trap "rm -rf /scratch/*" exit
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ "$GIT_BRANCH" != "master" ]; then
sed -i "s#master#$GIT_BRANCH#" ./scripts/repo.json
fi
if [ -d "/scratch" ]; then
rsync -a --exclude .tox ./ /scratch
fi
@ -12,7 +18,7 @@ fi
pushd /scratch/integration
# Start rancher-catalog-service and wait for it to start.
/usr/bin/rancher-catalog-service -catalogUrl ../ -refreshInterval 7200 > /dev/null 2>&1 &
/usr/bin/rancher-catalog-service -configFile ../scripts/repo.json -refreshInterval 7200 > /dev/null 2>&1 &
sleep 10
tox -e flake8,py27
popd