From 05d354942ca3441ed77f101d76b50e2ee8d9fc3e Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Thu, 19 May 2016 10:41:39 +0100 Subject: [PATCH] Try using thingdoer --- circle.yml | 34 ++++------------------------ tasks.yml | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 30 deletions(-) create mode 100644 tasks.yml diff --git a/circle.yml b/circle.yml index d8aee125c..fb3b67114 100644 --- a/circle.yml +++ b/circle.yml @@ -25,39 +25,13 @@ dependencies: make deps && mkdir -p $(dirname $SRCDIR) && cp -r $(pwd)/ $SRCDIR - - "cd $SRCDIR/client; ../tools/rebuild-image weaveworks/scope-ui-build . Dockerfile package.json webpack.production.config.js .eslintrc .babelrc && touch $SRCDIR/.scope_ui_build.uptodate" - - "cd $SRCDIR/backend; ../tools/rebuild-image weaveworks/scope-backend-build . Dockerfile build.sh && touch $SRCDIR/.scope_backend_build.uptodate" - - test -z "$SECRET_PASSWORD" || (cd $SRCDIR/integration; ./gce.sh make_template): - parallel: false test: override: - - cd $SRCDIR; make RM= lint: - parallel: true - - cd $SRCDIR; COVERDIR=./coverage make RM= tests: - parallel: true - - cd $SRCDIR; make RM= client-test static: - parallel: true - - cd $SRCDIR; rm -f prog/scope; if [ "$CIRCLE_NODE_INDEX" = "0" ]; then GOARCH=arm make GO_BUILD_INSTALL_DEPS= RM= prog/scope; else GOOS=darwin make GO_BUILD_INSTALL_DEPS= RM= prog/scope; fi: - parallel: true - - cd $SRCDIR; rm -f prog/scope; make RM=: - parallel: true - - cd $SRCDIR/experimental; ./build_on_circle.sh: - parallel: true - - "test -z \"$SECRET_PASSWORD\" || (cd $SRCDIR/integration; ./gce.sh setup && eval $(./gce.sh hosts); ./setup.sh)": - parallel: true - - test -z "$SECRET_PASSWORD" || (cd $SRCDIR/integration; eval $(./gce.sh hosts); ./run_all.sh): - parallel: true - timeout: 300 - post: - - test -z "$SECRET_PASSWORD" || (cd $SRCDIR/integration; ./gce.sh destroy): - parallel: true - - test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR; ./tools/cover/gather_coverage.sh ./coverage $SRCDIR/coverage): - parallel: true - - test "$CIRCLE_NODE_INDEX" != "0" || (goveralls -repotoken $COVERALLS_REPO_TOKEN -coverprofile=$SRCDIR/profile.cov -service=circleci || true): - parallel: true - - test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR; cp coverage.* scope.tar $CIRCLE_ARTIFACTS): - parallel: true + - > + cd $SRCDIR; + go get ./tools/thingdoer; + thingdoer tasks.yml deployment: hub: diff --git a/tasks.yml b/tasks.yml new file mode 100644 index 000000000..61a5750e6 --- /dev/null +++ b/tasks.yml @@ -0,0 +1,65 @@ +- name: build-image + command: > + cd backend; + ../tools/rebuild-image weaveworks/scope-backend-build . Dockerfile build.sh && \ + touch $SRCDIR/.scope_backend_build.uptodate + +- name: ui-build-image + command: > + cd client; + ../tools/rebuild-image weaveworks/scope-ui-build . Dockerfile package.json webpack.production.config.js .eslintrc .babelrc && \ + touch $SRCDIR/.scope_ui_build.uptodate + +- name: vm-template + command: test -z "$SECRET_PASSWORD" || (cd integration; ./gce.sh make_template) + +- name: arm-darwin-build + after: [build-image] + command: > + rm -f prog/scope; + if [ "$CIRCLE_NODE_INDEX" = "0" ]; then + GOARCH=arm make GO_BUILD_INSTALL_DEPS= RM= prog/scope; + else + GOOS=darwin make GO_BUILD_INSTALL_DEPS= RM= prog/scope; + fi + +- name: build + after: [arm-darwin-build, ui-build-image] + command: rm -f prog/scope; make RM= + +- name: integration + after: [build, vm-template] + command: > + test -z "$SECRET_PASSWORD" || ( + cd integration; + ./gce.sh setup && + eval $(./gce.sh hosts) && + ./setup.sh && + ./run_all.sh && + ./gce.sh destroy + ) + +- name: lint + after: [build-image] + command: make RM= lint + +- name: test + after: [build-image] + command: COVERDIR=./coverage make RM= tests + +- name: client-test + after: [ui-build-image] + command: make RM= client-test static + +- name: coverage + after: [test] + command: > + test "$CIRCLE_NODE_INDEX" != "0" || ( + ./tools/cover/gather_coverage.sh ./coverage $SRCDIR/coverage; + goveralls -repotoken $COVERALLS_REPO_TOKEN -coverprofile=$SRCDIR/profile.cov -service=circleci || true; + cp coverage.* scope.tar $CIRCLE_ARTIFACTS + ) + +- name: experimental + after: [build-image] + command: cd experimental; ./build_on_circle.sh