Skip to content

Commit

Permalink
Build official packages with Go 1.13.1 (influxdata#6462)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson authored and Mathieu Lecarme committed Apr 17, 2020
1 parent 436110b commit 8218474
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 195 deletions.
70 changes: 33 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@ defaults:
working_directory: '/go/src/github.com/influxdata/telegraf'
environment:
GOFLAGS: -p=8
go-1_10: &go-1_10
docker:
- image: 'quay.io/influxdb/telegraf-ci:1.10.8'
go-1_11: &go-1_11
docker:
- image: 'quay.io/influxdb/telegraf-ci:1.11.13'
go-1_12: &go-1_12
docker:
- image: 'quay.io/influxdb/telegraf-ci:1.12.10'
go-1_13: &go-1_13
docker:
- image: 'quay.io/influxdb/telegraf-ci:1.13.1'

version: 2
jobs:
deps:
<<: [ *defaults, *go-1_12 ]
<<: [ *defaults, *go-1_13 ]
steps:
- checkout
- restore_cache:
Expand All @@ -34,38 +31,37 @@ jobs:
paths:
- '*'

test-go-1.10:
<<: [ *defaults, *go-1_10 ]
steps:
- attach_workspace:
at: '/go/src'
# disabled due to gofmt differences (1.10 vs 1.11).
#- run: 'make check'
- run: 'make test'
test-go-1.11:
<<: [ *defaults, *go-1_11 ]
test-go-1.12:
<<: [ *defaults, *go-1_12 ]
steps:
- attach_workspace:
at: '/go/src'
- run: 'make check'
- run: 'make test'
test-go-1.12:
test-go-1.12-386:
<<: [ *defaults, *go-1_12 ]
steps:
- attach_workspace:
at: '/go/src'
- run: 'GOARCH=386 make check'
- run: 'GOARCH=386 make test'
test-go-1.12-386:
<<: [ *defaults, *go-1_12 ]
test-go-1.13:
<<: [ *defaults, *go-1_13 ]
steps:
- attach_workspace:
at: '/go/src'
- run: 'make check'
- run: 'make test'
test-go-1.13-386:
<<: [ *defaults, *go-1_13 ]
steps:
- attach_workspace:
at: '/go/src'
- run: 'GOARCH=386 make check'
- run: 'GOARCH=386 make test'

package:
<<: [ *defaults, *go-1_12 ]
<<: [ *defaults, *go-1_13 ]
steps:
- attach_workspace:
at: '/go/src'
Expand All @@ -74,7 +70,7 @@ jobs:
path: './build'
destination: 'build'
release:
<<: [ *defaults, *go-1_12 ]
<<: [ *defaults, *go-1_13 ]
steps:
- attach_workspace:
at: '/go/src'
Expand All @@ -83,7 +79,7 @@ jobs:
path: './build'
destination: 'build'
nightly:
<<: [ *defaults, *go-1_12 ]
<<: [ *defaults, *go-1_13 ]
steps:
- attach_workspace:
at: '/go/src'
Expand All @@ -100,42 +96,42 @@ workflows:
filters:
tags:
only: /.*/
- 'test-go-1.10':
- 'test-go-1.12':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.11':
- 'test-go-1.12-386':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.12':
- 'test-go-1.13':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.12-386':
- 'test-go-1.13-386':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'package':
requires:
- 'test-go-1.10'
- 'test-go-1.11'
- 'test-go-1.12'
- 'test-go-1.12-386'
- 'test-go-1.13'
- 'test-go-1.13-386'
- 'release':
requires:
- 'test-go-1.10'
- 'test-go-1.11'
- 'test-go-1.12'
- 'test-go-1.12-386'
- 'test-go-1.13'
- 'test-go-1.13-386'
filters:
tags:
only: /.*/
Expand All @@ -144,24 +140,24 @@ workflows:
nightly:
jobs:
- 'deps'
- 'test-go-1.10':
- 'test-go-1.12':
requires:
- 'deps'
- 'test-go-1.11':
- 'test-go-1.12-386':
requires:
- 'deps'
- 'test-go-1.12':
- 'test-go-1.13':
requires:
- 'deps'
- 'test-go-1.12-386':
- 'test-go-1.13-386':
requires:
- 'deps'
- 'nightly':
requires:
- 'test-go-1.10'
- 'test-go-1.11'
- 'test-go-1.12'
- 'test-go-1.12-386'
- 'test-go-1.13'
- 'test-go-1.13-386'
triggers:
- schedule:
cron: "0 7 * * *"
Expand Down
15 changes: 5 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,12 @@ plugin-%:
@echo "Starting dev environment for $${$(@)} input plugin..."
@docker-compose -f plugins/inputs/$${$(@)}/dev/docker-compose.yml up

.PHONY: ci-1.13
ci-1.13:
docker build -t quay.io/influxdb/telegraf-ci:1.13.1 - < scripts/ci-1.13.docker
docker push quay.io/influxdb/telegraf-ci:1.13.1

.PHONY: ci-1.12
ci-1.12:
docker build -t quay.io/influxdb/telegraf-ci:1.12.10 - < scripts/ci-1.12.docker
docker push quay.io/influxdb/telegraf-ci:1.12.10

.PHONY: ci-1.11
ci-1.11:
docker build -t quay.io/influxdb/telegraf-ci:1.11.13 - < scripts/ci-1.11.docker
docker push quay.io/influxdb/telegraf-ci:1.11.13

.PHONY: ci-1.10
ci-1.10:
docker build -t quay.io/influxdb/telegraf-ci:1.10.8 - < scripts/ci-1.10.docker
docker push quay.io/influxdb/telegraf-ci:1.10.8
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ Ansible role: https://github.com/rossmcdonald/telegraf

### From Source:

Telegraf requires golang version 1.10 or newer, the Makefile requires GNU make.
Telegraf requires golang version 1.12 or newer, the Makefile requires GNU make.

1. [Install Go](https://golang.org/doc/install) >=1.10 (1.12 recommended)
1. [Install Go](https://golang.org/doc/install) >=1.12 (1.13 recommended)
2. [Install dep](https://golang.github.io/dep/docs/installation.html) ==v0.5.0
3. Download Telegraf source:
```
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ platform: x64

install:
- IF NOT EXIST "C:\Cache" mkdir C:\Cache
- IF NOT EXIST "C:\Cache\go1.12.9.msi" curl -o "C:\Cache\go1.12.9.msi" https://storage.googleapis.com/golang/go1.12.9.windows-amd64.msi
- IF NOT EXIST "C:\Cache\go1.13.1.msi" curl -o "C:\Cache\go1.13.1.msi" https://storage.googleapis.com/golang/go1.13.1.windows-amd64.msi
- IF NOT EXIST "C:\Cache\gnuwin32-bin.zip" curl -o "C:\Cache\gnuwin32-bin.zip" https://dl.influxdata.com/telegraf/ci/make-3.81-bin.zip
- IF NOT EXIST "C:\Cache\gnuwin32-dep.zip" curl -o "C:\Cache\gnuwin32-dep.zip" https://dl.influxdata.com/telegraf/ci/make-3.81-dep.zip
- IF EXIST "C:\Go" rmdir /S /Q C:\Go
- msiexec.exe /i "C:\Cache\go1.12.9.msi" /quiet
- msiexec.exe /i "C:\Cache\go1.13.1.msi" /quiet
- 7z x "C:\Cache\gnuwin32-bin.zip" -oC:\GnuWin32 -y
- 7z x "C:\Cache\gnuwin32-dep.zip" -oC:\GnuWin32 -y
- go get -d github.com/golang/dep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func TestSimpleMetricCreated(t *testing.T) {
{"neither value nor count", map[string]interface{}{"v1": "alpha", "v2": 45.8}, "", []string{"v2"}},
{"value is of wrong type", map[string]interface{}{"value": "alpha", "count": 15}, "", []string{"count"}},
{"count is of wrong type", map[string]interface{}{"value": 23.77, "count": 7.5}, "", []string{"count", "value"}},
{"count is out of range", map[string]interface{}{"value": -98.45E4, "count": math.MaxUint64 - uint64(20)}, "", []string{"value", "count"}},
{"count is out of range", map[string]interface{}{"value": -98.45e4, "count": math.MaxUint64 - uint64(20)}, "", []string{"value", "count"}},
{"several additional fields", map[string]interface{}{"alpha": 10, "bravo": "bravo", "charlie": 30, "delta": 40.7}, "", []string{"alpha", "charlie", "delta"}},
}

Expand Down
114 changes: 0 additions & 114 deletions plugins/outputs/prometheus_client/prometheus_client_tls_test.go

This file was deleted.

28 changes: 0 additions & 28 deletions scripts/ci-1.11.docker

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/ci-1.10.docker → scripts/ci-1.13.docker
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.10.8
FROM golang:1.13.1

RUN chmod -R 755 "$GOPATH"

Expand Down

0 comments on commit 8218474

Please sign in to comment.