mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
fixing and simplifying circle build
The integration tests were using two different versions of weave. One to launch the weave container, and another used by scope.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 "$@"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user