Merge pull request #346 from weaveworks/fixing-circle

Fixing circle build
This commit is contained in:
Tom Wilkie
2015-08-11 14:24:02 +01:00
3 changed files with 17 additions and 15 deletions

View File

@@ -13,7 +13,7 @@ machine:
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
SCOPE_UI_BUILD: $HOME/docker/scope_ui_build.tar
WEAVE_REPO: github.com/weaveworks/weave
WEAVE_ROOT: "${GOPATH%%:*}/src/github.com/weaveworks/weave"
WEAVE_ROOT: /home/ubuntu/src/github.com/weaveworks/weave
dependencies:
cache_directories:
@@ -24,9 +24,8 @@ dependencies:
- curl https://sdk.cloud.google.com | bash
- test -z "$SECRET_PASSWORD" || bin/setup-circleci-secrets "$SECRET_PASSWORD"
post:
- git clone --depth 1 -b master https://$WEAVE_REPO.git "$WEAVE_ROOT"
- go get $WEAVE_REPO/...
- cd $WEAVE_ROOT; make testing/runner/runner
- make -C $WEAVE_ROOT testing/runner/runner
- sudo apt-get install jq
- go version
- go clean -i net

View File

@@ -5,6 +5,7 @@
start_suite "Launch 2 scopes and check they cluster"
weave_on $HOST2 launch
weave_on $HOST2 launch-dns
docker_on $HOST2 run -dit --name db1 peterbourgon/tns-db
container_id=$(docker_on $HOST2 run -dit --name app1 --link db1:db1 peterbourgon/tns-app)
@@ -13,7 +14,7 @@ scope_on $HOST2 launch $HOST1
SUCCESS=
for i in {1..10}; do
if (curl $HOST1:4040/api/topology/containers | grep "$container_id" >/dev/null); then
if (curl -s $HOST1:4040/api/topology/containers | grep "$container_id" >/dev/null); then
SUCCESS=1
break
fi

View File

@@ -7,16 +7,11 @@ set -e
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_REPO:=github.com/weaveworks/weave}
: ${WEAVE_ROOT:="$(go list -e -f {{.Dir}} $WEAVE_REPO)"}
RUNNER="$WEAVE_ROOT/testing/runner/runner"
[ -x "$RUNNER" ] || (echo "Could not find weave test runner at $RUNNER." >&2 ; exit 1)
. "$WEAVE_ROOT/test/config.sh"
@@ -24,5 +19,12 @@ scope_on() {
host=$1
shift 1
[ -z "$DEBUG" ] || greyly echo "Scope on $host: $@" >&2
run_on $host "DOCKER_HOST=tcp://$host:$DOCKER_PORT" scope "$@"
run_on $host DOCKER_HOST=tcp://$host:$DOCKER_PORT scope "$@"
}
weave_on() {
host=$1
shift 1
[ -z "$DEBUG" ] || greyly echo "Weave on $host: $@" >&2
run_on $host DOCKER_HOST=tcp://$host:$DOCKER_PORT weave "$@"
}