Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
split up circleCI jobs into parrallel workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Dieterbe committed Jan 3, 2018
1 parent d5ca2bc commit 7434db9
Showing 1 changed file with 49 additions and 9 deletions.
58 changes: 49 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
version: 2
jobs:
build:
working_directory: /home/circleci/.go_workspace/src/github.com/grafana/metrictank
machine: true
working_directory: /go/src/github.com/grafana/metrictank
docker:
- image: circleci/golang:1.9.1
steps:
- run: go version
- checkout
- run: echo $GOPATH
- run: docker version
- run: docker-compose version
- run: scripts/build.sh
- run: scripts/build_tools.sh
- run: scripts/build_docker.sh
- persist_to_workspace:
root: .
paths: build

qa:
working_directory: /go/src/github.com/grafana/metrictank
docker:
- image: circleci/golang:1.9.1
steps:
- checkout
- run: scripts/qa/gofmt.sh
- run: scripts/qa/go-generate.sh
Expand All @@ -17,12 +28,26 @@ jobs:
- run: scripts/qa/unused.sh
- run: scripts/qa/vendor.sh
- run: go vet ./...
- run: scripts/build.sh
- run: scripts/build_tools.sh
- run: scripts/build_docker.sh
- run: scripts/qa/docs.sh
- run: go test -v -race $(go list ./... | grep -v github.com/grafana/metrictank/chaos)

qa-post-build:
working_directory: /home/circleci/.go_workspace/src/github.com/grafana/metrictank
machine: true
steps:
- attach_workspace:
at: build
- run: find . build
- run: scripts/qa/docs.sh
- run: scripts/qa/end2end.sh

deploy:
working_directory: /go/src/github.com/grafana/metrictank
docker:
- image: circleci/golang:1.9
steps:
- attach_workspace:
at: build
- checkout
- run: scripts/depends.sh
- run: scripts/build_packages.sh
- store_artifacts:
Expand All @@ -36,3 +61,18 @@ jobs:
docker login -u $DOCKER_USER -p $DOCKER_PASS
scripts/push/docker.sh
fi
workflows:
version: 2
build_accept_deploy:
jobs:
- build
- qa
- qa-post-build:
requires:
- build
- deploy:
requires:
- qa
- build
- qa-post-build

0 comments on commit 7434db9

Please sign in to comment.