version: 2 defaults: &defaults docker: - image: weaveworks/weavebuild:circle20-50a4e941 working_directory: /go/src/github.com/weaveworks/weave jobs: lint: <<: *defaults steps: - checkout - run: git submodule update --init - run: make DEBUG=1 BUILD_IN_CONTAINER=false lint unit-test: <<: *defaults parallelism: 2 steps: - checkout - run: COVERDIR=test/coverage make BUILD_IN_CONTAINER=false tests build: <<: *defaults steps: - checkout - setup_remote_docker - run: git submodule update --init - run: make COVERAGE=true BUILD_IN_CONTAINER=false SUDO= exes all - persist_to_workspace: root: . paths: - weave.tar.gz - tools/runner/runner - test/tls/tls smoke-tests: machine: image: circleci/classic:201709-01 environment: GOPATH: /home/circleci SRCDIR: /home/circleci/src/github.com/weaveworks/weave CIRCLE_ARTIFACTS: /tmp/artifacts parallelism: 2 steps: - checkout - run: mkdir $CIRCLE_ARTIFACTS # copy source dir and submodule update --init - run: bin/circle-dependencies-post-sources - attach_workspace: at: /home/circleci/src/github.com/weaveworks/weave # kick off creation of test VMs - run: command: bin/provision_test_vms.sh background: true # when VMs are ready, copy built software to them - run: command: bin/circle-test-pre background: true - run: command: bin/circle-test-smoke no_output_timeout: 360s # Destroy testing VMs: - run: command: bin/circle-destroy-vms background: true - deploy: command: cd $SRCDIR/test; ./gen_coverage_reports.sh # run goveralls; copy coverage reports to artifacts dir - deploy: command: $SRCDIR/bin/circle-teardown-pre - store_artifacts: path: /tmp/artifacts deploy: <<: *defaults steps: - setup_remote_docker # Rebuild without coverage and push to dockerhub - deploy: bin/circle-deploy-master workflows: version: 2 build_test: jobs: - lint - unit-test - build - smoke-tests: requires: - lint - unit-test - build - deploy: requires: - smoke-tests filters: branches: only: master