Add deploy step to CircleCI
This commit is contained in:
parent
48c441a825
commit
be3a7580b6
1 changed files with 23 additions and 3 deletions
|
@ -3,14 +3,34 @@
|
||||||
# Check https://circleci.com/docs/2.0/language-go/ for more details
|
# Check https://circleci.com/docs/2.0/language-go/ for more details
|
||||||
version: 2
|
version: 2
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/golang:1.9
|
- image: circleci/golang:1.9
|
||||||
|
|
||||||
working_directory: /go/src/github.com/hipages/php-fpm_exporter
|
working_directory: /go/src/github.com/hipages/php-fpm_exporter
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run: curl -L -s https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 -o /go/bin/dep && chmod +x /go/bin/dep
|
- run: curl -L -s https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 -o /go/bin/dep && chmod +x /go/bin/dep
|
||||||
- run: dep ensure -vendor-only
|
- run: dep ensure -vendor-only
|
||||||
- run: go test -v ./...
|
- run: go test -v ./...
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
docker:
|
||||||
|
- image: circleci/golang:1.9
|
||||||
|
working_directory: /go/src/github.com/hipages/php-fpm_exporter
|
||||||
|
steps:
|
||||||
|
- run: curl -L -s https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 -o /go/bin/dep && chmod +x /go/bin/dep
|
||||||
|
- run: dep ensure -vendor-only
|
||||||
|
- run: curl -sL https://git.io/goreleaser | bash
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
build-n-deploy:
|
||||||
|
jobs:
|
||||||
|
- build
|
||||||
|
- deploy:
|
||||||
|
requires:
|
||||||
|
- build
|
||||||
|
filters:
|
||||||
|
tags:
|
||||||
|
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
|
Loading…
Reference in a new issue