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 22, 2018
1 parent ad6976a commit f727213
Showing 1 changed file with 59 additions and 10 deletions.
69 changes: 59 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
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.2
steps:
- checkout
- run: scripts/build.sh
- run: scripts/build_tools.sh
- setup_remote_docker
- run: scripts/build_docker.sh
- persist_to_workspace:
root: .
paths: build

test:
working_directory: /go/src/github.com/grafana/metrictank
docker:
- image: circleci/golang:1.9.2
steps:
- checkout
- run: go test -v -race $(go list ./... | grep -v github.com/grafana/metrictank/chaos)

qa:
working_directory: /go/src/github.com/grafana/metrictank
docker:
- image: circleci/golang:1.9.2
steps:
- run: go version
- run: echo $GOPATH
- run: docker version
- run: docker-compose version
- checkout
- run: scripts/qa/gofmt.sh
- run: scripts/qa/go-generate.sh
Expand All @@ -17,12 +36,25 @@ 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

qa-post-build:
working_directory: /home/circleci/.go_workspace/src/github.com/grafana/metrictank
machine: true
steps:
- checkout
- attach_workspace:
at: .
- run: scripts/qa/docs.sh
- run: go test -v -race $(go list ./... | grep -v github.com/grafana/metrictank/chaos)
- run: scripts/qa/end2end.sh

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

0 comments on commit f727213

Please sign in to comment.