Files
weave-scope/integration/config.sh
Paul Bellamy 8aede5aaf9 Fixing the build
* override the weave template and hosts count for gce
* weave gce script wants jq as well now
* build the new weave go test runner
2015-07-31 10:31:07 +01:00

29 lines
707 B
Bash

# NB only to be sourced
set -e
# these ought to match what is in Vagrantfile
# exported to override weave config.sh
export SSH_DIR="$PWD"
export HOSTS
WEAVE_REPO="github.com/weaveworks/weave"
WEAVE_ROOT="${GOPATH%%:*}/src/$WEAVE_REPO"
if [ ! -d "$WEAVE_ROOT" ] ; then
mkdir -p "$(dirname "$WEAVE_ROOT")"
git clone --depth 1 -b master https://$WEAVE_REPO.git "$WEAVE_ROOT"
go get $WEAVE_REPO/...
fi
if [ ! -x "$WEAVE_ROOT/testing/runner/runner" ] ; then
(cd "$WEAVE_ROOT" && make testing/runner/runner)
fi
. "$WEAVE_ROOT/test/config.sh"
scope_on() {
host=$1
shift 1
[ -z "$DEBUG" ] || greyly echo "Scope on $host: $@" >&2
run_on $host "DOCKER_HOST=tcp://$host:$DOCKER_PORT" scope "$@"
}