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'
|
2019-08-09 00:24:04 +00:00
|
|
|
environment:
|
|
|
|
GOFLAGS: -p=8
|
2019-05-30 01:54:44 +00:00
|
|
|
go-1_12: &go-1_12
|
|
|
|
docker:
|
2020-02-25 20:05:44 +00:00
|
|
|
- image: 'quay.io/influxdb/telegraf-ci:1.12.17'
|
2020-01-16 22:38:06 +00:00
|
|
|
environment:
|
|
|
|
GO111MODULE: 'on'
|
2019-10-08 04:08:28 +00:00
|
|
|
go-1_13: &go-1_13
|
|
|
|
docker:
|
2020-02-25 20:05:44 +00:00
|
|
|
- image: 'quay.io/influxdb/telegraf-ci:1.13.8'
|
2020-02-20 22:23:13 +00:00
|
|
|
mac: &mac
|
|
|
|
macos:
|
|
|
|
xcode: 11.3.1
|
|
|
|
working_directory: '~/go/src/github.com/influxdata/telegraf'
|
|
|
|
environment:
|
|
|
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
|
|
|
GOFLAGS: -p=8
|
2020-02-25 20:05:44 +00:00
|
|
|
|
2018-02-01 23:05:39 +00:00
|
|
|
version: 2
|
|
|
|
jobs:
|
2018-04-18 23:14:06 +00:00
|
|
|
deps:
|
2019-10-08 04:08:28 +00:00
|
|
|
<<: [ *defaults, *go-1_13 ]
|
2018-02-01 23:05:39 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2018-06-19 18:55:38 +00:00
|
|
|
- restore_cache:
|
2020-01-16 22:38:06 +00:00
|
|
|
key: go-mod-v1-{{ checksum "go.sum" }}
|
2018-04-02 21:13:15 +00:00
|
|
|
- run: 'make deps'
|
2020-01-16 22:38:06 +00:00
|
|
|
- run: 'make tidy'
|
2018-06-19 18:55:38 +00:00
|
|
|
- save_cache:
|
2020-01-16 22:38:06 +00:00
|
|
|
name: 'go module cache'
|
|
|
|
key: go-mod-v1-{{ checksum "go.sum" }}
|
2018-06-19 18:55:38 +00:00
|
|
|
paths:
|
2020-01-16 22:38:06 +00:00
|
|
|
- '/go/pkg/mod'
|
2018-04-18 23:14:06 +00:00
|
|
|
- persist_to_workspace:
|
2020-01-16 22:38:06 +00:00
|
|
|
root: '/go'
|
2018-04-18 23:14:06 +00:00
|
|
|
paths:
|
|
|
|
- '*'
|
2020-02-20 22:23:13 +00:00
|
|
|
macdeps:
|
|
|
|
<<: [ *mac ]
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
key: mac-go-mod-v1-{{ checksum "go.sum" }}
|
|
|
|
- run: 'brew install go@1.13'
|
|
|
|
- run: 'make deps'
|
|
|
|
- run: 'make tidy'
|
|
|
|
- save_cache:
|
|
|
|
name: 'go module cache'
|
|
|
|
key: mac-go-mod-v1-{{ checksum "go.sum" }}
|
|
|
|
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-24 21:57:24 +00:00
|
|
|
|
2019-10-08 04:08:28 +00:00
|
|
|
test-go-1.12:
|
|
|
|
<<: [ *defaults, *go-1_12 ]
|
2018-07-24 21:57:24 +00:00
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
2020-01-16 22:38:06 +00:00
|
|
|
at: '/go'
|
|
|
|
- run: 'make'
|
2019-01-08 01:14:07 +00:00
|
|
|
- run: 'make check'
|
2018-10-19 18:01:31 +00:00
|
|
|
- run: 'make test'
|
2019-10-08 04:08:28 +00:00
|
|
|
test-go-1.12-386:
|
2019-05-30 01:54:44 +00:00
|
|
|
<<: [ *defaults, *go-1_12 ]
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
2020-01-16 22:38:06 +00:00
|
|
|
at: '/go'
|
|
|
|
- run: 'GOARCH=386 make'
|
2019-05-30 01:54:44 +00:00
|
|
|
- run: 'GOARCH=386 make check'
|
|
|
|
- run: 'GOARCH=386 make test'
|
2019-10-08 04:08:28 +00:00
|
|
|
test-go-1.13:
|
|
|
|
<<: [ *defaults, *go-1_13 ]
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
2020-01-16 22:38:06 +00:00
|
|
|
at: '/go'
|
|
|
|
- run: 'make'
|
2019-10-08 04:08:28 +00:00
|
|
|
- run: 'make check'
|
2020-03-09 21:47:28 +00:00
|
|
|
- run: 'make check-deps'
|
2019-10-08 04:08:28 +00:00
|
|
|
- run: 'make test'
|
|
|
|
test-go-1.13-386:
|
|
|
|
<<: [ *defaults, *go-1_13 ]
|
2018-10-19 18:01:31 +00:00
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
2020-01-16 22:38:06 +00:00
|
|
|
at: '/go'
|
|
|
|
- run: 'GOARCH=386 make'
|
2019-01-08 01:14:07 +00:00
|
|
|
- run: 'GOARCH=386 make check'
|
2018-07-24 21:57:24 +00:00
|
|
|
- run: 'GOARCH=386 make test'
|
2020-02-20 22:23:13 +00:00
|
|
|
test-go-1.13-darwin:
|
|
|
|
<<: [ *mac ]
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: '/'
|
|
|
|
- run: 'make'
|
|
|
|
- run: 'make check'
|
|
|
|
- run: 'make test'
|
2020-02-25 20:05:44 +00:00
|
|
|
|
2018-07-24 21:57:24 +00:00
|
|
|
package:
|
2019-10-08 04:08:28 +00:00
|
|
|
<<: [ *defaults, *go-1_13 ]
|
2018-07-24 21:57:24 +00:00
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
2020-01-16 22:38:06 +00:00
|
|
|
at: '/go'
|
2018-07-24 21:57:24 +00:00
|
|
|
- run: 'make package'
|
|
|
|
- store_artifacts:
|
|
|
|
path: './build'
|
|
|
|
destination: 'build'
|
2018-02-01 23:05:39 +00:00
|
|
|
release:
|
2019-10-08 04:08:28 +00:00
|
|
|
<<: [ *defaults, *go-1_13 ]
|
2018-02-01 23:05:39 +00:00
|
|
|
steps:
|
2018-04-18 23:14:06 +00:00
|
|
|
- attach_workspace:
|
2020-01-16 22:38:06 +00:00
|
|
|
at: '/go'
|
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:
|
2019-10-08 04:08:28 +00:00
|
|
|
<<: [ *defaults, *go-1_13 ]
|
2018-02-01 23:05:39 +00:00
|
|
|
steps:
|
2018-04-18 23:14:06 +00:00
|
|
|
- attach_workspace:
|
2020-01-16 22:38:06 +00:00
|
|
|
at: '/go'
|
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:
|
2020-02-20 22:23:13 +00:00
|
|
|
- 'macdeps':
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-07-24 21:57:24 +00:00
|
|
|
- 'deps':
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2019-10-08 04:08:28 +00:00
|
|
|
- 'test-go-1.12':
|
2018-04-18 23:14:06 +00:00
|
|
|
requires:
|
|
|
|
- 'deps'
|
2018-07-24 21:57:24 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2019-10-08 04:08:28 +00:00
|
|
|
- 'test-go-1.12-386':
|
2018-10-19 18:01:31 +00:00
|
|
|
requires:
|
|
|
|
- 'deps'
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2019-10-08 04:08:28 +00:00
|
|
|
- 'test-go-1.13':
|
2019-05-30 01:54:44 +00:00
|
|
|
requires:
|
|
|
|
- 'deps'
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2019-10-08 04:08:28 +00:00
|
|
|
- 'test-go-1.13-386':
|
2018-07-24 21:57:24 +00:00
|
|
|
requires:
|
|
|
|
- 'deps'
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2020-02-20 22:23:13 +00:00
|
|
|
- 'test-go-1.13-darwin':
|
|
|
|
requires:
|
|
|
|
- 'macdeps'
|
|
|
|
filters:
|
|
|
|
tags: # only runs on tags if you specify this filter
|
|
|
|
only: /.*/
|
2018-07-24 21:57:24 +00:00
|
|
|
- 'package':
|
|
|
|
requires:
|
2019-05-30 01:54:44 +00:00
|
|
|
- 'test-go-1.12'
|
|
|
|
- 'test-go-1.12-386'
|
2019-10-08 04:08:28 +00:00
|
|
|
- 'test-go-1.13'
|
|
|
|
- 'test-go-1.13-386'
|
2018-02-01 23:05:39 +00:00
|
|
|
- 'release':
|
|
|
|
requires:
|
2019-05-30 01:54:44 +00:00
|
|
|
- 'test-go-1.12'
|
|
|
|
- 'test-go-1.12-386'
|
2019-10-08 04:08:28 +00:00
|
|
|
- 'test-go-1.13'
|
|
|
|
- 'test-go-1.13-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'
|
2019-10-08 04:08:28 +00:00
|
|
|
- 'test-go-1.12':
|
2018-04-18 23:14:06 +00:00
|
|
|
requires:
|
|
|
|
- 'deps'
|
2019-10-08 04:08:28 +00:00
|
|
|
- 'test-go-1.12-386':
|
2018-10-19 18:01:31 +00:00
|
|
|
requires:
|
|
|
|
- 'deps'
|
2019-10-08 04:08:28 +00:00
|
|
|
- 'test-go-1.13':
|
2019-05-30 01:54:44 +00:00
|
|
|
requires:
|
|
|
|
- 'deps'
|
2019-10-08 04:08:28 +00:00
|
|
|
- 'test-go-1.13-386':
|
2018-07-24 21:57:24 +00:00
|
|
|
requires:
|
|
|
|
- 'deps'
|
2018-02-02 20:29:54 +00:00
|
|
|
- 'nightly':
|
|
|
|
requires:
|
2019-05-30 01:54:44 +00:00
|
|
|
- 'test-go-1.12'
|
|
|
|
- 'test-go-1.12-386'
|
2019-10-08 04:08:28 +00:00
|
|
|
- 'test-go-1.13'
|
|
|
|
- 'test-go-1.13-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
|