Use CircleCI 2.0 for builds (#3731)

This commit is contained in:
Paul Myjavec
2018-02-02 10:05:39 +11:00
committed by Daniel Nelson
parent 1164289619
commit 9b4177d46c
10 changed files with 236 additions and 191 deletions

47
.circleci/config.yml Normal file
View File

@@ -0,0 +1,47 @@
---
defaults: &defaults
docker:
- image: 'circleci/golang:1.9.2'
working_directory: '/go/src/github.com/influxdata/telegraf'
version: 2
jobs:
build:
<<: *defaults
steps:
- checkout
- run: 'make ci-test'
release:
<<: *defaults
steps:
- checkout
- run: './scripts/release.sh'
- store_artifacts:
path: './artifacts'
destination: '.'
nightly:
<<: *defaults
steps:
- checkout
- run: './scripts/release.sh'
- store_artifacts:
path: './artifacts'
destination: '.'
workflows:
version: 2
build_and_release:
jobs:
- 'build'
- 'release':
requires:
- 'build'
nightly:
jobs:
- 'build'
- 'nightly'
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master