2016-09-09 10:51:56 -07:00

29 lines
616 B
Bash
Executable File

#!/bin/bash
set -e
cd $(dirname $0)/..
trap "rm -rf /scratch/*" exit
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ -n "${DRONE_BRANCH}" ]; then
git checkout -b ${DRONE_BRANCH}
GIT_BRANCH=${DRONE_BRANCH}
fi
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
pushd /scratch/integration
# Start rancher-catalog-service and wait for it to start.
/usr/bin/rancher-catalog-service -configFile ../scripts/repo.json -refreshInterval 7200 > /dev/null 2>&1 &
sleep 10
tox -e flake8,py27
popd