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 4af33db
Showing 1 changed file with 47 additions and 8 deletions.
55 changes: 47 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@ version: 2
jobs:
build:
working_directory: /home/circleci/.go_workspace/src/github.com/grafana/metrictank
machine: true
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: /home/circleci/.go_workspace/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,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
- run: scripts/qa/docs.sh
- run: go test -v -race $(go list ./... | grep -v github.com/grafana/metrictank/chaos)

qa-post-build:
machine: true
steps:
- attach_workspace:
at: build
- run: find . build
- run: scripts/qa/docs.sh
- run: scripts/qa/end2end.sh

deploy:
working_directory: /home/circleci/.go_workspace/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 +60,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 4af33db

Please sign in to comment.