telegraf/.circleci/config.yml

97 lines
2.1 KiB
YAML
Raw Normal View History

2018-02-02 07:05:39 +08:00
---
defaults:
defaults: &defaults
working_directory: '/go/src/github.com/influxdata/telegraf'
go-1_9: &go-1_9
docker:
- image: 'circleci/golang:1.9.7'
go-1_10: &go-1_10
docker:
- image: 'circleci/golang:1.10.3'
2018-02-02 07:05:39 +08:00
version: 2
jobs:
deps:
<<: [ *defaults, *go-1_10 ]
2018-02-02 07:05:39 +08:00
steps:
- checkout
- restore_cache:
2018-07-03 04:23:29 +08:00
key: vendor-{{ checksum "Gopkg.lock" }}
2018-04-03 05:13:15 +08:00
- run: 'make deps'
- save_cache:
name: 'vendored deps'
2018-07-03 04:23:29 +08:00
key: vendor-{{ checksum "Gopkg.lock" }}
paths:
- './vendor'
- persist_to_workspace:
root: '/go/src'
paths:
- '*'
test-go-1.9:
<<: [ *defaults, *go-1_9 ]
steps:
- attach_workspace:
at: '/go/src'
- run: 'make test-ci'
test-go-1.10:
<<: [ *defaults, *go-1_10 ]
steps:
- attach_workspace:
at: '/go/src'
2018-04-03 05:13:15 +08:00
- run: 'make test-ci'
2018-04-21 06:10:22 +08:00
- run: 'GOARCH=386 make test-ci'
2018-02-02 07:05:39 +08:00
release:
<<: [ *defaults, *go-1_10 ]
2018-02-02 07:05:39 +08:00
steps:
- attach_workspace:
at: '/go/src'
2018-02-02 07:05:39 +08:00
- run: './scripts/release.sh'
- store_artifacts:
path: './artifacts'
destination: '.'
nightly:
<<: [ *defaults, *go-1_10 ]
2018-02-02 07:05:39 +08:00
steps:
- attach_workspace:
at: '/go/src'
2018-02-02 07:05:39 +08:00
- run: './scripts/release.sh'
- store_artifacts:
path: './artifacts'
destination: '.'
2018-02-02 07:05:39 +08:00
workflows:
version: 2
build_and_release:
jobs:
- 'deps'
- 'test-go-1.9':
requires:
- 'deps'
- 'test-go-1.10':
requires:
- 'deps'
2018-02-02 07:05:39 +08:00
- 'release':
requires:
- 'test-go-1.9'
- 'test-go-1.10'
2018-02-02 07:05:39 +08:00
nightly:
jobs:
- 'deps'
- 'test-go-1.9':
requires:
- 'deps'
2018-04-25 04:42:42 +08:00
- 'test-go-1.10':
requires:
- 'deps'
2018-02-03 04:29:54 +08:00
- 'nightly':
requires:
- 'test-go-1.9'
- 'test-go-1.10'
2018-02-02 07:05:39 +08:00
triggers:
- schedule:
2018-04-25 04:42:42 +08:00
cron: "0 7 * * *"
2018-02-02 07:05:39 +08:00
filters:
branches:
only:
- master