2018-02-02 07:05:39 +08:00
|
|
|
---
|
2018-04-19 07:14:06 +08:00
|
|
|
defaults:
|
|
|
|
|
defaults: &defaults
|
|
|
|
|
working_directory: '/go/src/github.com/influxdata/telegraf'
|
2019-08-09 08:24:04 +08:00
|
|
|
environment:
|
|
|
|
|
GOFLAGS: -p=8
|
2020-05-27 06:40:25 +08:00
|
|
|
go-1_14: &go-1_14
|
|
|
|
|
docker:
|
2020-10-08 02:51:49 +08:00
|
|
|
- image: 'quay.io/influxdb/telegraf-ci:1.14.9'
|
|
|
|
|
go-1_15: &go-1_15
|
|
|
|
|
docker:
|
2020-11-21 06:53:44 +08:00
|
|
|
- image: 'quay.io/influxdb/telegraf-ci:1.15.5'
|
2020-02-21 06:23:13 +08:00
|
|
|
mac: &mac
|
|
|
|
|
macos:
|
2020-12-05 07:53:57 +08:00
|
|
|
xcode: 12.1.0
|
2020-02-21 06:23:13 +08:00
|
|
|
working_directory: '~/go/src/github.com/influxdata/telegraf'
|
|
|
|
|
environment:
|
|
|
|
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
|
|
|
|
GOFLAGS: -p=8
|
2020-02-26 04:05:44 +08:00
|
|
|
|
2018-02-02 07:05:39 +08:00
|
|
|
version: 2
|
|
|
|
|
jobs:
|
2018-04-19 07:14:06 +08:00
|
|
|
deps:
|
2020-10-08 02:51:49 +08:00
|
|
|
<<: [ *defaults, *go-1_15 ]
|
2018-02-02 07:05:39 +08:00
|
|
|
steps:
|
|
|
|
|
- checkout
|
2018-06-20 02:55:38 +08:00
|
|
|
- restore_cache:
|
2020-01-17 06:38:06 +08:00
|
|
|
key: go-mod-v1-{{ checksum "go.sum" }}
|
2018-04-03 05:13:15 +08:00
|
|
|
- run: 'make deps'
|
2020-01-17 06:38:06 +08:00
|
|
|
- run: 'make tidy'
|
2018-06-20 02:55:38 +08:00
|
|
|
- save_cache:
|
2020-01-17 06:38:06 +08:00
|
|
|
name: 'go module cache'
|
|
|
|
|
key: go-mod-v1-{{ checksum "go.sum" }}
|
2018-06-20 02:55:38 +08:00
|
|
|
paths:
|
2020-01-17 06:38:06 +08:00
|
|
|
- '/go/pkg/mod'
|
2018-04-19 07:14:06 +08:00
|
|
|
- persist_to_workspace:
|
2020-01-17 06:38:06 +08:00
|
|
|
root: '/go'
|
2018-04-19 07:14:06 +08:00
|
|
|
paths:
|
|
|
|
|
- '*'
|
2020-02-21 06:23:13 +08:00
|
|
|
macdeps:
|
|
|
|
|
<<: [ *mac ]
|
|
|
|
|
steps:
|
|
|
|
|
- checkout
|
|
|
|
|
- restore_cache:
|
2020-12-05 07:53:57 +08:00
|
|
|
key: mac-go-mod-v2-{{ checksum "go.sum" }}
|
2020-07-04 03:06:26 +08:00
|
|
|
- run: 'brew install go' # latest
|
2020-02-21 06:23:13 +08:00
|
|
|
- run: 'make deps'
|
|
|
|
|
- run: 'make tidy'
|
|
|
|
|
- save_cache:
|
|
|
|
|
name: 'go module cache'
|
2020-12-05 07:53:57 +08:00
|
|
|
key: mac-go-mod-v2-{{ checksum "go.sum" }}
|
2020-02-21 06:23:13 +08:00
|
|
|
paths:
|
|
|
|
|
- '~/go/pkg/mod'
|
|
|
|
|
- '/usr/local/Cellar/go'
|
|
|
|
|
- '/usr/local/bin/go'
|
|
|
|
|
- '/usr/local/bin/gofmt'
|
|
|
|
|
- persist_to_workspace:
|
|
|
|
|
root: '/'
|
|
|
|
|
paths:
|
|
|
|
|
- 'usr/local/bin/go'
|
|
|
|
|
- 'usr/local/Cellar/go'
|
|
|
|
|
- 'usr/local/bin/gofmt'
|
|
|
|
|
- 'Users/distiller/go'
|
2018-07-25 05:57:24 +08:00
|
|
|
|
2020-10-08 02:51:49 +08:00
|
|
|
test-go-1.14:
|
|
|
|
|
<<: [ *defaults, *go-1_14 ]
|
2018-07-25 05:57:24 +08:00
|
|
|
steps:
|
|
|
|
|
- attach_workspace:
|
2020-01-17 06:38:06 +08:00
|
|
|
at: '/go'
|
|
|
|
|
- run: 'make'
|
2018-10-20 02:01:31 +08:00
|
|
|
- run: 'make test'
|
2020-10-08 02:51:49 +08:00
|
|
|
test-go-1.14-386:
|
|
|
|
|
<<: [ *defaults, *go-1_14 ]
|
2019-05-30 09:54:44 +08:00
|
|
|
steps:
|
|
|
|
|
- attach_workspace:
|
2020-01-17 06:38:06 +08:00
|
|
|
at: '/go'
|
|
|
|
|
- run: 'GOARCH=386 make'
|
2019-05-30 09:54:44 +08:00
|
|
|
- run: 'GOARCH=386 make test'
|
2020-10-08 02:51:49 +08:00
|
|
|
test-go-1.15:
|
|
|
|
|
<<: [ *defaults, *go-1_15 ]
|
2019-10-08 12:08:28 +08:00
|
|
|
steps:
|
|
|
|
|
- attach_workspace:
|
2020-01-17 06:38:06 +08:00
|
|
|
at: '/go'
|
|
|
|
|
- run: 'make'
|
2019-10-08 12:08:28 +08:00
|
|
|
- run: 'make check'
|
2020-03-10 05:47:28 +08:00
|
|
|
- run: 'make check-deps'
|
2019-10-08 12:08:28 +08:00
|
|
|
- run: 'make test'
|
2020-10-08 02:51:49 +08:00
|
|
|
test-go-1.15-386:
|
|
|
|
|
<<: [ *defaults, *go-1_15 ]
|
2018-10-20 02:01:31 +08:00
|
|
|
steps:
|
|
|
|
|
- attach_workspace:
|
2020-01-17 06:38:06 +08:00
|
|
|
at: '/go'
|
|
|
|
|
- run: 'GOARCH=386 make'
|
2019-01-08 09:14:07 +08:00
|
|
|
- run: 'GOARCH=386 make check'
|
2018-07-25 05:57:24 +08:00
|
|
|
- run: 'GOARCH=386 make test'
|
2020-07-04 03:06:26 +08:00
|
|
|
test-go-darwin:
|
2020-02-21 06:23:13 +08:00
|
|
|
<<: [ *mac ]
|
|
|
|
|
steps:
|
|
|
|
|
- attach_workspace:
|
|
|
|
|
at: '/'
|
|
|
|
|
- run: 'make'
|
|
|
|
|
- run: 'make check'
|
|
|
|
|
- run: 'make test'
|
2020-02-26 04:05:44 +08:00
|
|
|
|
2018-07-25 05:57:24 +08:00
|
|
|
package:
|
2020-10-08 02:51:49 +08:00
|
|
|
<<: [ *defaults, *go-1_15 ]
|
2018-07-25 05:57:24 +08:00
|
|
|
steps:
|
|
|
|
|
- attach_workspace:
|
2020-01-17 06:38:06 +08:00
|
|
|
at: '/go'
|
2018-07-25 05:57:24 +08:00
|
|
|
- run: 'make package'
|
|
|
|
|
- store_artifacts:
|
2020-06-30 15:15:28 +08:00
|
|
|
path: './build/dist'
|
|
|
|
|
destination: 'build/dist'
|
|
|
|
|
|
2018-02-02 07:05:39 +08:00
|
|
|
release:
|
2020-10-08 02:51:49 +08:00
|
|
|
<<: [ *defaults, *go-1_15 ]
|
2018-02-02 07:05:39 +08:00
|
|
|
steps:
|
2018-04-19 07:14:06 +08:00
|
|
|
- attach_workspace:
|
2020-01-17 06:38:06 +08:00
|
|
|
at: '/go'
|
2020-06-30 15:15:28 +08:00
|
|
|
- run: 'make package'
|
2018-02-02 07:05:39 +08:00
|
|
|
- store_artifacts:
|
2020-06-30 15:15:28 +08:00
|
|
|
path: './build/dist'
|
|
|
|
|
destination: 'build/dist'
|
2018-02-02 07:05:39 +08:00
|
|
|
nightly:
|
2020-10-08 02:51:49 +08:00
|
|
|
<<: [ *defaults, *go-1_15 ]
|
2018-02-02 07:05:39 +08:00
|
|
|
steps:
|
2018-04-19 07:14:06 +08:00
|
|
|
- attach_workspace:
|
2020-01-17 06:38:06 +08:00
|
|
|
at: '/go'
|
2020-06-30 15:15:28 +08:00
|
|
|
- run: 'NIGHTLY=1 make package'
|
|
|
|
|
- run: 'make upload-nightly'
|
2018-02-02 07:05:39 +08:00
|
|
|
- store_artifacts:
|
2020-06-30 15:15:28 +08:00
|
|
|
path: './build/dist'
|
|
|
|
|
destination: 'build/dist'
|
2018-04-19 07:14:06 +08:00
|
|
|
|
2018-02-02 07:05:39 +08:00
|
|
|
workflows:
|
|
|
|
|
version: 2
|
2018-07-25 05:57:24 +08:00
|
|
|
check:
|
2018-02-02 07:05:39 +08:00
|
|
|
jobs:
|
2020-02-21 06:23:13 +08:00
|
|
|
- 'macdeps':
|
|
|
|
|
filters:
|
|
|
|
|
tags:
|
|
|
|
|
only: /.*/
|
2018-07-25 05:57:24 +08:00
|
|
|
- 'deps':
|
|
|
|
|
filters:
|
|
|
|
|
tags:
|
|
|
|
|
only: /.*/
|
2020-10-08 02:51:49 +08:00
|
|
|
- 'test-go-1.14':
|
2018-04-19 07:14:06 +08:00
|
|
|
requires:
|
|
|
|
|
- 'deps'
|
2018-07-25 05:57:24 +08:00
|
|
|
filters:
|
|
|
|
|
tags:
|
|
|
|
|
only: /.*/
|
2020-10-08 02:51:49 +08:00
|
|
|
- 'test-go-1.14-386':
|
2018-10-20 02:01:31 +08:00
|
|
|
requires:
|
|
|
|
|
- 'deps'
|
|
|
|
|
filters:
|
|
|
|
|
tags:
|
|
|
|
|
only: /.*/
|
2020-10-08 02:51:49 +08:00
|
|
|
- 'test-go-1.15':
|
2019-05-30 09:54:44 +08:00
|
|
|
requires:
|
|
|
|
|
- 'deps'
|
|
|
|
|
filters:
|
|
|
|
|
tags:
|
|
|
|
|
only: /.*/
|
2020-10-08 02:51:49 +08:00
|
|
|
- 'test-go-1.15-386':
|
2018-07-25 05:57:24 +08:00
|
|
|
requires:
|
|
|
|
|
- 'deps'
|
|
|
|
|
filters:
|
|
|
|
|
tags:
|
|
|
|
|
only: /.*/
|
2020-07-04 03:06:26 +08:00
|
|
|
- 'test-go-darwin':
|
2020-02-21 06:23:13 +08:00
|
|
|
requires:
|
|
|
|
|
- 'macdeps'
|
|
|
|
|
filters:
|
|
|
|
|
tags: # only runs on tags if you specify this filter
|
|
|
|
|
only: /.*/
|
2018-07-25 05:57:24 +08:00
|
|
|
- 'package':
|
|
|
|
|
requires:
|
2020-07-15 08:21:02 +08:00
|
|
|
- 'test-go-darwin'
|
2020-05-27 06:40:25 +08:00
|
|
|
- 'test-go-1.14'
|
|
|
|
|
- 'test-go-1.14-386'
|
2020-10-08 02:51:49 +08:00
|
|
|
- 'test-go-1.15'
|
|
|
|
|
- 'test-go-1.15-386'
|
2018-02-02 07:05:39 +08:00
|
|
|
- 'release':
|
|
|
|
|
requires:
|
2020-07-15 08:21:02 +08:00
|
|
|
- 'test-go-darwin'
|
2020-05-27 06:40:25 +08:00
|
|
|
- 'test-go-1.14'
|
|
|
|
|
- 'test-go-1.14-386'
|
2020-10-08 02:51:49 +08:00
|
|
|
- 'test-go-1.15'
|
|
|
|
|
- 'test-go-1.15-386'
|
2018-07-25 05:57:24 +08:00
|
|
|
filters:
|
|
|
|
|
tags:
|
|
|
|
|
only: /.*/
|
|
|
|
|
branches:
|
|
|
|
|
ignore: /.*/
|
2018-02-02 07:05:39 +08:00
|
|
|
nightly:
|
|
|
|
|
jobs:
|
2018-04-19 07:14:06 +08:00
|
|
|
- 'deps'
|
2020-07-15 08:21:02 +08:00
|
|
|
- 'macdeps'
|
2020-10-08 02:51:49 +08:00
|
|
|
- 'test-go-1.14':
|
2018-04-19 07:14:06 +08:00
|
|
|
requires:
|
|
|
|
|
- 'deps'
|
2020-10-08 02:51:49 +08:00
|
|
|
- 'test-go-1.14-386':
|
2018-10-20 02:01:31 +08:00
|
|
|
requires:
|
|
|
|
|
- 'deps'
|
2020-10-08 02:51:49 +08:00
|
|
|
- 'test-go-1.15':
|
2019-05-30 09:54:44 +08:00
|
|
|
requires:
|
|
|
|
|
- 'deps'
|
2020-10-08 02:51:49 +08:00
|
|
|
- 'test-go-1.15-386':
|
2018-07-25 05:57:24 +08:00
|
|
|
requires:
|
|
|
|
|
- 'deps'
|
2020-07-15 08:21:02 +08:00
|
|
|
- 'test-go-darwin':
|
|
|
|
|
requires:
|
|
|
|
|
- 'macdeps'
|
2018-02-03 04:29:54 +08:00
|
|
|
- 'nightly':
|
|
|
|
|
requires:
|
2020-07-15 08:21:02 +08:00
|
|
|
- 'test-go-darwin'
|
2020-05-27 06:40:25 +08:00
|
|
|
- 'test-go-1.14'
|
|
|
|
|
- 'test-go-1.14-386'
|
2020-10-08 02:51:49 +08:00
|
|
|
- 'test-go-1.15'
|
|
|
|
|
- 'test-go-1.15-386'
|
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
|