telegraf/.circleci/config.yml

174 lines
3.8 KiB
YAML
Raw Normal View History

2018-02-01 23:05:39 +00:00
---
defaults:
defaults: &defaults
working_directory: '/go/src/github.com/influxdata/telegraf'
environment:
GOFLAGS: -p=8
go-1_12: &go-1_12
docker:
2019-12-07 01:10:59 +00:00
- image: 'quay.io/influxdb/telegraf-ci:1.12.14'
environment:
GO111MODULE: 'on'
go-1_13: &go-1_13
docker:
2019-12-07 01:10:59 +00:00
- image: 'quay.io/influxdb/telegraf-ci:1.13.5'
2018-02-01 23:05:39 +00:00
version: 2
jobs:
deps:
<<: [ *defaults, *go-1_13 ]
2018-02-01 23:05:39 +00:00
steps:
- checkout
- restore_cache:
key: go-mod-v1-{{ checksum "go.sum" }}
2018-04-02 21:13:15 +00:00
- run: 'make deps'
- run: 'make tidy'
- save_cache:
name: 'go module cache'
key: go-mod-v1-{{ checksum "go.sum" }}
paths:
- '/go/pkg/mod'
- persist_to_workspace:
root: '/go'
paths:
- '*'
test-go-1.12:
<<: [ *defaults, *go-1_12 ]
steps:
- attach_workspace:
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'
test-go-1.12-386:
<<: [ *defaults, *go-1_12 ]
steps:
- attach_workspace:
at: '/go'
- run: 'GOARCH=386 make'
- run: 'GOARCH=386 make check'
- run: 'GOARCH=386 make test'
test-go-1.13:
<<: [ *defaults, *go-1_13 ]
steps:
- attach_workspace:
at: '/go'
- run: 'make'
- run: 'make check'
- run: 'make test'
test-go-1.13-386:
<<: [ *defaults, *go-1_13 ]
2018-10-19 18:01:31 +00:00
steps:
- attach_workspace:
at: '/go'
- run: 'GOARCH=386 make'
2019-01-08 01:14:07 +00:00
- run: 'GOARCH=386 make check'
- run: 'GOARCH=386 make test'
package:
<<: [ *defaults, *go-1_13 ]
steps:
- attach_workspace:
at: '/go'
- run: 'make package'
- store_artifacts:
path: './build'
destination: 'build'
2018-02-01 23:05:39 +00:00
release:
<<: [ *defaults, *go-1_13 ]
2018-02-01 23:05:39 +00:00
steps:
- attach_workspace:
at: '/go'
- run: 'make package-release'
2018-02-01 23:05:39 +00:00
- store_artifacts:
path: './build'
destination: 'build'
2018-02-01 23:05:39 +00:00
nightly:
<<: [ *defaults, *go-1_13 ]
2018-02-01 23:05:39 +00:00
steps:
- attach_workspace:
at: '/go'
- run: 'make package-nightly'
2018-02-01 23:05:39 +00:00
- store_artifacts:
path: './build'
destination: 'build'
2018-02-01 23:05:39 +00:00
workflows:
version: 2
check:
2018-02-01 23:05:39 +00:00
jobs:
- 'deps':
filters:
tags:
only: /.*/
- 'test-go-1.12':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.12-386':
2018-10-19 18:01:31 +00:00
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.13':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.13-386':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'package':
requires:
- 'test-go-1.12'
- 'test-go-1.12-386'
- 'test-go-1.13'
- 'test-go-1.13-386'
2018-02-01 23:05:39 +00:00
- 'release':
requires:
- 'test-go-1.12'
- 'test-go-1.12-386'
- 'test-go-1.13'
- 'test-go-1.13-386'
filters:
tags:
only: /.*/
branches:
ignore: /.*/
2018-02-01 23:05:39 +00:00
nightly:
jobs:
- 'deps'
- 'test-go-1.12':
requires:
- 'deps'
- 'test-go-1.12-386':
2018-10-19 18:01:31 +00:00
requires:
- 'deps'
- 'test-go-1.13':
requires:
- 'deps'
- 'test-go-1.13-386':
requires:
- 'deps'
2018-02-02 20:29:54 +00:00
- 'nightly':
requires:
- 'test-go-1.12'
- 'test-go-1.12-386'
- '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