version: 2 jobs: build: 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 - restore_cache: key: v1-cache-{{ checksum "build/Dockerfile" }}-{{ checksum "build/build.sh" }} # kick off creation of test VMs - run: command: bin/provision_test_vms.sh background: true # create build image and make all - run: bin/circle-dependencies-post - save_cache: key: v1-cache-{{ checksum "build/Dockerfile" }}-{{ checksum "build/build.sh" }} paths: - "~/docker" # when VMs are ready, copy built software to them - run: command: bin/circle-test-pre background: true - run: bin/circle-test-unit - run: command: bin/circle-test-smoke no_output_timeout: 360s # Generate code coverage reports - run: bin/circle-test-teardown # Destroy testing VMs: - run: command: bin/circle-destroy-vms background: true # run goveralls; copy coverage reports to artifacts dir - deploy: command: $SRCDIR/bin/circle-teardown-pre - store_artifacts: path: /tmp/artifacts - deploy: command: | if [ "${CIRCLE_BRANCH}" == "master" ]; then bin/circle-deploy-master fi