37 lines
No EOL
1 KiB
YAML
37 lines
No EOL
1 KiB
YAML
# Golang CircleCI 2.0 configuration file
|
|
#
|
|
# Check https://circleci.com/docs/2.0/language-go/ for more details
|
|
version: 2
|
|
jobs:
|
|
|
|
build:
|
|
docker:
|
|
- image: circleci/golang:1.9
|
|
working_directory: /go/src/github.com/hipages/php-fpm_exporter
|
|
steps:
|
|
- 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: dep ensure -vendor-only
|
|
- run: go test -v ./...
|
|
|
|
deploy:
|
|
docker:
|
|
- image: circleci/golang:1.9
|
|
working_directory: /go/src/github.com/hipages/php-fpm_exporter
|
|
steps:
|
|
- 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: 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]+)*(-.*)*/ |