From b1f224c4af4fe12a1a2e0c225954e0b88d2f0cd1 Mon Sep 17 00:00:00 2001 From: Dennis Pattmann Date: Fri, 19 Aug 2016 21:40:58 +0200 Subject: [PATCH] Set right git branch for rancher-catalog-service (#249) --- scripts/repo.json | 8 ++++++++ scripts/test | 8 +++++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 scripts/repo.json diff --git a/scripts/repo.json b/scripts/repo.json new file mode 100644 index 0000000..7c64b18 --- /dev/null +++ b/scripts/repo.json @@ -0,0 +1,8 @@ + { + "catalogs": { + "library": { + "url": "/scratch", + "branch": "master" + } + } +} diff --git a/scripts/test b/scripts/test index 2ea821f..77a71aa 100755 --- a/scripts/test +++ b/scripts/test @@ -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