php-fpm-exporter/.circleci/config.yml

37 lines
1 KiB
YAML
Raw Normal View History

2018-02-18 00:55:06 +00:00
# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
jobs:
2018-02-18 11:49:36 +00:00
2018-02-18 00:55:06 +00:00
build:
docker:
- image: circleci/golang:1.9
working_directory: /go/src/github.com/hipages/php-fpm_exporter
steps:
- checkout
2018-02-18 11:49:36 +00:00
- 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 ./...
2018-02-18 00:55:06 +00:00
2018-02-18 11:49:36 +00:00
deploy:
docker:
- image: circleci/golang:1.9
working_directory: /go/src/github.com/hipages/php-fpm_exporter
steps:
2018-02-18 11:50:08 +00:00
- checkout
2018-02-18 10:13:14 +00:00
- 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
2018-02-18 09:36:05 +00:00
- run: dep ensure -vendor-only
2018-02-18 11:49:36 +00:00
- run: curl -sL https://git.io/goreleaser | bash
workflows:
version: 2
build-n-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
tags:
2018-02-18 11:55:12 +00:00
only: /^v[0-9]+(\.[0-9]+)*(-.*)*/