2018-02-01 23:05:39 +00:00
|
|
|
---
|
2018-04-18 23:14:06 +00:00
|
|
|
defaults:
|
|
|
|
defaults: &defaults
|
|
|
|
working_directory: '/go/src/github.com/influxdata/telegraf'
|
|
|
|
go-1_9: &go-1_9
|
|
|
|
docker:
|
2018-07-24 21:57:24 +00:00
|
|
|
- image: 'quay.io/influxdb/telegraf-ci:1.9.7'
|
2018-04-18 23:14:06 +00:00
|
|
|
go-1_10: &go-1_10
|
|
|
|
docker:
|
2019-01-03 20:41:16 +00:00
|
|
|
- image: 'quay.io/influxdb/telegraf-ci:1.10.7'
|
2018-10-19 18:01:31 +00:00
|
|
|
go-1_11: &go-1_11
|
|
|
|
docker:
|
2019-01-03 20:41:16 +00:00
|
|
|
- image: 'quay.io/influxdb/telegraf-ci:1.11.4'
|
2018-04-18 23:14:06 +00:00
|
|
|
|
2018-02-01 23:05:39 +00:00
|
|
|
version: 2
|
|
|
|
jobs:
|
2018-04-18 23:14:06 +00:00
|
|
|
deps:
|
2018-10-19 18:01:31 +00:00
|
|
|
<<: [ *defaults, *go-1_11 ]
|
2018-02-01 23:05:39 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2018-06-19 18:55:38 +00:00
|
|
|
- restore_cache:
|
2018-07-02 20:23:29 +00:00
|
|
|
key: vendor-{{ checksum "Gopkg.lock" }}
|
2018-04-02 21:13:15 +00:00
|
|
|
- run: 'make deps'
|
2018-06-19 18:55:38 +00:00
|
|
|
- save_cache:
|
|
|
|
name: 'vendored deps'
|
2018-07-02 20:23:29 +00:00
|
|
|
key: vendor-{{ checksum "Gopkg.lock" }}
|
2018-06-19 18:55:38 +00:00
|
|
|
paths:
|
|
|
|
- './vendor'
|
2018-04-18 23:14:06 +00:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: '/go/src'
|
|
|
|
paths:
|
|
|
|
- '*'
|
2018-07-24 21:57:24 +00:00
|
|
|
|
2018-04-18 23:14:06 +00:00
|
|
|
test-go-1.9:
|
|
|
|
<<: [ *defaults, *go-1_9 ]
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: '/go/src'
|
2018-07-24 21:57:24 +00:00
|
|
|
- run: 'make check'
|
|
|
|
- run: 'make test'
|
2018-04-18 23:14:06 +00:00
|
|
|
test-go-1.10:
|
|
|
|
<<: [ *defaults, *go-1_10 ]
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: '/go/src'
|
2018-07-24 21:57:24 +00:00
|
|
|
- run: 'make check'
|
|
|
|
- run: 'make test'
|
2018-10-19 18:01:31 +00:00
|
|
|
test-go-1.11:
|
|
|
|
<<: [ *defaults, *go-1_11 ]
|
2018-07-24 21:57:24 +00:00
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: '/go/src'
|
2018-10-19 18:01:31 +00:00
|
|
|
# disabled due to gofmt differences (1.10 vs 1.11).
|
|
|
|
# - run: 'make check'
|
|
|
|
- run: 'make test'
|
|
|
|
test-go-1.11-386:
|
|
|
|
<<: [ *defaults, *go-1_11 ]
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: '/go/src'
|
|
|
|
# disabled due to gofmt differences (1.10 vs 1.11).
|
|
|
|
# - run: 'GOARCH=386 make check'
|
2018-07-24 21:57:24 +00:00
|
|
|
- run: 'GOARCH=386 make test'
|
|
|
|
|
|
|
|
package:
|
2018-10-19 18:01:31 +00:00
|
|
|
<<: [ *defaults, *go-1_11 ]
|
2018-07-24 21:57:24 +00:00
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: '/go/src'
|
|
|
|
- run: 'make package'
|
|
|
|
- store_artifacts:
|
|
|
|
path: './build'
|
|
|
|
destination: 'build'
|
2018-02-01 23:05:39 +00:00
|
|
|
release:
|
2018-10-19 18:01:31 +00:00
|
|
|
<<: [ *defaults, *go-1_11 ]
|
2018-02-01 23:05:39 +00:00
|
|
|
steps:
|
2018-04-18 23:14:06 +00:00
|
|
|
- attach_workspace:
|
|
|
|
at: '/go/src'
|
2018-07-24 21:57:24 +00:00
|
|
|
- run: 'make package-release'
|
2018-02-01 23:05:39 +00:00
|
|
|
- store_artifacts:
|
2018-07-24 21:57:24 +00:00
|
|
|
path: './build'
|
|
|
|
destination: 'build'
|
2018-02-01 23:05:39 +00:00
|
|
|
nightly:
|
2018-10-19 18:01:31 +00:00
|
|
|
<<: [ *defaults, *go-1_11 ]
|
2018-02-01 23:05:39 +00:00
|
|
|
steps:
|
2018-04-18 23:14:06 +00:00
|
|
|
- attach_workspace:
|
|
|
|
at: '/go/src'
|
2018-07-24 21:57:24 +00:00
|
|
|
- run: 'make package-nightly'
|
2018-02-01 23:05:39 +00:00
|
|
|
- store_artifacts:
|
2018-07-24 21:57:24 +00:00
|
|
|
path: './build'
|
|
|
|
destination: 'build'
|
2018-04-18 23:14:06 +00:00
|
|
|
|
2018-02-01 23:05:39 +00:00
|
|
|
workflows:
|
|
|
|
version: 2
|
2018-07-24 21:57:24 +00:00
|
|
|
check:
|
2018-02-01 23:05:39 +00:00
|
|
|
jobs:
|
2018-07-24 21:57:24 +00:00
|
|
|
- 'deps':
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-04-18 23:14:06 +00:00
|
|
|
- 'test-go-1.9':
|
|
|
|
requires:
|
|
|
|
- 'deps'
|
2018-07-24 21:57:24 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-04-18 23:14:06 +00:00
|
|
|
- 'test-go-1.10':
|
|
|
|
requires:
|
|
|
|
- 'deps'
|
2018-07-24 21:57:24 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-10-19 18:01:31 +00:00
|
|
|
- 'test-go-1.11':
|
|
|
|
requires:
|
|
|
|
- 'deps'
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
- 'test-go-1.11-386':
|
2018-07-24 21:57:24 +00:00
|
|
|
requires:
|
|
|
|
- 'deps'
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
- 'package':
|
|
|
|
requires:
|
|
|
|
- 'test-go-1.9'
|
|
|
|
- 'test-go-1.10'
|
2018-10-19 18:01:31 +00:00
|
|
|
- 'test-go-1.11'
|
|
|
|
- 'test-go-1.11-386'
|
2018-02-01 23:05:39 +00:00
|
|
|
- 'release':
|
|
|
|
requires:
|
2018-04-18 23:14:06 +00:00
|
|
|
- 'test-go-1.9'
|
|
|
|
- 'test-go-1.10'
|
2018-10-19 18:01:31 +00:00
|
|
|
- 'test-go-1.11'
|
|
|
|
- 'test-go-1.11-386'
|
2018-07-24 21:57:24 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
2018-02-01 23:05:39 +00:00
|
|
|
nightly:
|
|
|
|
jobs:
|
2018-04-18 23:14:06 +00:00
|
|
|
- 'deps'
|
|
|
|
- 'test-go-1.9':
|
|
|
|
requires:
|
|
|
|
- 'deps'
|
2018-04-24 20:42:42 +00:00
|
|
|
- 'test-go-1.10':
|
2018-04-18 23:14:06 +00:00
|
|
|
requires:
|
|
|
|
- 'deps'
|
2018-10-19 18:01:31 +00:00
|
|
|
- 'test-go-1.11':
|
|
|
|
requires:
|
|
|
|
- 'deps'
|
|
|
|
- 'test-go-1.11-386':
|
2018-07-24 21:57:24 +00:00
|
|
|
requires:
|
|
|
|
- 'deps'
|
2018-02-02 20:29:54 +00:00
|
|
|
- 'nightly':
|
|
|
|
requires:
|
2018-04-18 23:14:06 +00:00
|
|
|
- 'test-go-1.9'
|
|
|
|
- 'test-go-1.10'
|
2018-10-19 18:01:31 +00:00
|
|
|
- 'test-go-1.11'
|
|
|
|
- 'test-go-1.11-386'
|
2018-02-01 23:05:39 +00:00
|
|
|
triggers:
|
|
|
|
- schedule:
|
2018-04-24 20:42:42 +00:00
|
|
|
cron: "0 7 * * *"
|
2018-02-01 23:05:39 +00:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|