79 lines
2.9 KiB
YAML
79 lines
2.9 KiB
YAML
general:
|
|
branches:
|
|
ignore:
|
|
- gh\-pages
|
|
- /pull\/.*/
|
|
|
|
machine:
|
|
services:
|
|
- docker
|
|
environment:
|
|
GOPATH: /home/ubuntu:$GOPATH
|
|
SRCDIR: /home/ubuntu/src/github.com/weaveworks/weave
|
|
PATH: $PATH:$HOME/.local/bin:$HOME/google-cloud-sdk/bin/
|
|
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
|
|
|
|
dependencies:
|
|
cache_directories:
|
|
- "~/docker"
|
|
post:
|
|
- "sudo apt-get update && sudo apt-get install bc jq"
|
|
- curl https://sdk.cloud.google.com | bash
|
|
- bin/setup-circleci-secrets "$SECRET_PASSWORD"
|
|
- "mkdir -p $(dirname $SRCDIR) && cp -r $(pwd)/ $SRCDIR"
|
|
- "cd $SRCDIR; git submodule update --init"
|
|
- cd $SRCDIR/test; ./gce.sh make_template:
|
|
parallel: false
|
|
- "cd $SRCDIR/build; ../tools/rebuild-image weaveworks/weavebuild . Dockerfile build.sh && touch $SRCDIR/.build.uptodate"
|
|
|
|
test:
|
|
override:
|
|
- cd $SRCDIR; make lint:
|
|
parallel: true
|
|
- cd $SRCDIR; COVERDIR=test/coverage make RM= tests:
|
|
parallel: true
|
|
- cd $SRCDIR; make COVERAGE=true RM= all:
|
|
parallel: true
|
|
- cd $SRCDIR; make testrunner:
|
|
parallel: true
|
|
- cd $SRCDIR/test; ./gce.sh setup && eval $(./gce.sh hosts) && ./setup.sh:
|
|
parallel: true
|
|
- cd $SRCDIR/test; eval $(./gce.sh hosts); export COVERAGE=true; ./run_all.sh:
|
|
parallel: true
|
|
timeout: 300
|
|
post:
|
|
- cd $SRCDIR/test; ./gce.sh destroy:
|
|
parallel: true
|
|
- test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR/test; ./gen_coverage_reports.sh):
|
|
parallel: true
|
|
|
|
teardown:
|
|
pre:
|
|
- test "$CIRCLE_NODE_INDEX" != "0" || (go get github.com/mattn/goveralls && goveralls -repotoken $COVERALLS_REPO_TOKEN -coverprofile=$SRCDIR/test/profile.cov -service=circleci || true):
|
|
parallel: true
|
|
- test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR/test; cp coverage.* $CIRCLE_ARTIFACTS):
|
|
parallel: true
|
|
|
|
deployment:
|
|
release:
|
|
branch: /[0-9]+\.[0-9]+/
|
|
owner: weaveworks
|
|
commands:
|
|
- go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout v1.0.0 && cd cmd/wordepress && go get
|
|
- cd $SRCDIR; bin/publish-site "$WP_LIVE_URL" "$WP_LIVE_USER" "$WP_LIVE_PASSWORD"
|
|
hub:
|
|
branch: master
|
|
owner: weaveworks
|
|
commands:
|
|
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
|
|
- cd $SRCDIR; make clean-bin
|
|
- cd $SRCDIR; make publish
|
|
- go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout v1.0.0 && cd cmd/wordepress && go get
|
|
- cd $SRCDIR; bin/publish-site "$WP_DEV_URL" "$WP_DEV_USER" "$WP_DEV_PASSWORD"
|
|
issues:
|
|
branch: /.*/
|
|
owner: weaveworks
|
|
commands:
|
|
- go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout v1.0.0 && cd cmd/wordepress && go get
|
|
- cd $SRCDIR; bin/publish-site "$WP_DEV_URL" "$WP_DEV_USER" "$WP_DEV_PASSWORD"
|