Require dep to be installed before building (#4461)

This commit is contained in:
Daniel Nelson
2018-07-24 14:57:24 -07:00
committed by Greg
parent d95824a9c1
commit 9051ea9dc0
10 changed files with 204 additions and 86 deletions

View File

@@ -4,10 +4,10 @@ defaults:
working_directory: '/go/src/github.com/influxdata/telegraf'
go-1_9: &go-1_9
docker:
- image: 'circleci/golang:1.9.7'
- image: 'quay.io/influxdb/telegraf-ci:1.9.7'
go-1_10: &go-1_10
docker:
- image: 'circleci/golang:1.10.3'
- image: 'quay.io/influxdb/telegraf-ci:1.10.3'
version: 2
jobs:
@@ -27,53 +27,98 @@ jobs:
root: '/go/src'
paths:
- '*'
test-go-1.9:
<<: [ *defaults, *go-1_9 ]
steps:
- attach_workspace:
at: '/go/src'
- run: 'make test-ci'
- run: 'make check'
- run: 'make test'
test-go-1.10:
<<: [ *defaults, *go-1_10 ]
steps:
- attach_workspace:
at: '/go/src'
- run: 'make test-ci'
- run: 'GOARCH=386 make test-ci'
- run: 'make check'
- run: 'make test'
test-go-1.10-386:
<<: [ *defaults, *go-1_10 ]
steps:
- attach_workspace:
at: '/go/src'
- run: 'GOARCH=386 make check'
- run: 'GOARCH=386 make test'
package:
<<: [ *defaults, *go-1_10 ]
steps:
- attach_workspace:
at: '/go/src'
- run: 'make package'
- store_artifacts:
path: './build'
destination: 'build'
release:
<<: [ *defaults, *go-1_10 ]
steps:
- attach_workspace:
at: '/go/src'
- run: './scripts/release.sh'
- run: 'make package-release'
- store_artifacts:
path: './artifacts'
destination: '.'
path: './build'
destination: 'build'
nightly:
<<: [ *defaults, *go-1_10 ]
steps:
- attach_workspace:
at: '/go/src'
- run: './scripts/release.sh'
- run: 'make package-nightly'
- store_artifacts:
path: './artifacts'
destination: '.'
path: './build'
destination: 'build'
workflows:
version: 2
build_and_release:
check:
jobs:
- 'deps'
- 'deps':
filters:
tags:
only: /.*/
- 'test-go-1.9':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.10':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.10-386':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'package':
requires:
- 'test-go-1.9'
- 'test-go-1.10'
- 'test-go-1.10-386'
- 'release':
requires:
- 'test-go-1.9'
- 'test-go-1.10'
- 'test-go-1.10-386'
filters:
tags:
only: /.*/
branches:
ignore: /.*/
nightly:
jobs:
- 'deps'
@@ -83,10 +128,14 @@ workflows:
- 'test-go-1.10':
requires:
- 'deps'
- 'test-go-1.10-386':
requires:
- 'deps'
- 'nightly':
requires:
- 'test-go-1.9'
- 'test-go-1.10'
- 'test-go-1.10-386'
triggers:
- schedule:
cron: "0 7 * * *"