Update to Go 1.14.3 with testing using 1.13.11 (#7564)

This commit is contained in:
Daniel Nelson 2020-05-26 15:40:25 -07:00 committed by GitHub
parent bdbf57576a
commit d27f676091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 74 additions and 135 deletions

View File

@ -4,14 +4,12 @@ defaults:
working_directory: '/go/src/github.com/influxdata/telegraf'
environment:
GOFLAGS: -p=8
go-1_12: &go-1_12
docker:
- image: 'quay.io/influxdb/telegraf-ci:1.12.17'
environment:
GO111MODULE: 'on'
go-1_13: &go-1_13
docker:
- image: 'quay.io/influxdb/telegraf-ci:1.13.8'
- image: 'quay.io/influxdb/telegraf-ci:1.13.11'
go-1_14: &go-1_14
docker:
- image: 'quay.io/influxdb/telegraf-ci:1.14.3'
mac: &mac
macos:
xcode: 11.3.1
@ -23,7 +21,7 @@ defaults:
version: 2
jobs:
deps:
<<: [ *defaults, *go-1_13 ]
<<: [ *defaults, *go-1_14 ]
steps:
- checkout
- restore_cache:
@ -64,22 +62,22 @@ jobs:
- 'usr/local/bin/gofmt'
- 'Users/distiller/go'
test-go-1.12:
<<: [ *defaults, *go-1_12 ]
test-go-1.13:
<<: [ *defaults, *go-1_13 ]
steps:
- attach_workspace:
at: '/go'
- run: 'make'
- run: 'make test'
test-go-1.12-386:
<<: [ *defaults, *go-1_12 ]
test-go-1.13-386:
<<: [ *defaults, *go-1_13 ]
steps:
- attach_workspace:
at: '/go'
- run: 'GOARCH=386 make'
- run: 'GOARCH=386 make test'
test-go-1.13:
<<: [ *defaults, *go-1_13 ]
test-go-1.14:
<<: [ *defaults, *go-1_14 ]
steps:
- attach_workspace:
at: '/go'
@ -87,8 +85,8 @@ jobs:
- run: 'make check'
- run: 'make check-deps'
- run: 'make test'
test-go-1.13-386:
<<: [ *defaults, *go-1_13 ]
test-go-1.14-386:
<<: [ *defaults, *go-1_14 ]
steps:
- attach_workspace:
at: '/go'
@ -105,7 +103,7 @@ jobs:
- run: 'make test'
package:
<<: [ *defaults, *go-1_13 ]
<<: [ *defaults, *go-1_14 ]
steps:
- attach_workspace:
at: '/go'
@ -114,7 +112,7 @@ jobs:
path: './build'
destination: 'build'
release:
<<: [ *defaults, *go-1_13 ]
<<: [ *defaults, *go-1_14 ]
steps:
- attach_workspace:
at: '/go'
@ -123,7 +121,7 @@ jobs:
path: './build'
destination: 'build'
nightly:
<<: [ *defaults, *go-1_13 ]
<<: [ *defaults, *go-1_14 ]
steps:
- attach_workspace:
at: '/go'
@ -144,18 +142,6 @@ workflows:
filters:
tags:
only: /.*/
- 'test-go-1.12':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.12-386':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.13':
requires:
- 'deps'
@ -168,6 +154,18 @@ workflows:
filters:
tags:
only: /.*/
- 'test-go-1.14':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.14-386':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.13-darwin':
requires:
- 'macdeps'
@ -176,16 +174,16 @@ workflows:
only: /.*/
- 'package':
requires:
- 'test-go-1.12'
- 'test-go-1.12-386'
- 'test-go-1.13'
- 'test-go-1.13-386'
- 'test-go-1.14'
- 'test-go-1.14-386'
- 'release':
requires:
- 'test-go-1.12'
- 'test-go-1.12-386'
- 'test-go-1.13'
- 'test-go-1.13-386'
- 'test-go-1.14'
- 'test-go-1.14-386'
filters:
tags:
only: /.*/
@ -194,24 +192,24 @@ workflows:
nightly:
jobs:
- 'deps'
- 'test-go-1.12':
requires:
- 'deps'
- 'test-go-1.12-386':
requires:
- 'deps'
- 'test-go-1.13':
requires:
- 'deps'
- 'test-go-1.13-386':
requires:
- 'deps'
- 'test-go-1.14':
requires:
- 'deps'
- 'test-go-1.14-386':
requires:
- 'deps'
- 'nightly':
requires:
- 'test-go-1.12'
- 'test-go-1.12-386'
- 'test-go-1.13'
- 'test-go-1.13-386'
- 'test-go-1.14'
- 'test-go-1.14-386'
triggers:
- schedule:
cron: "0 7 * * *"

View File

@ -51,9 +51,9 @@ Ansible role: https://github.com/rossmcdonald/telegraf
### From Source:
Telegraf requires Go version 1.12 or newer, the Makefile requires GNU make.
Telegraf requires Go version 1.13 or newer, the Makefile requires GNU make.
1. [Install Go](https://golang.org/doc/install) >=1.12 (1.13 recommended)
1. [Install Go](https://golang.org/doc/install) >=1.13 (1.14 recommended)
2. Clone the Telegraf repository:
```
cd ~/src

View File

@ -1,5 +1,7 @@
version: "{build}"
image: Visual Studio 2019
cache:
- C:\gopath\pkg\mod -> go.sum
- C:\ProgramData\chocolatey\bin -> appveyor.yml
@ -8,13 +10,13 @@ cache:
clone_folder: C:\gopath\src\github.com\influxdata\telegraf
environment:
GOVERSION: 1.13.8
GOPATH: C:\gopath
stack: go 1.14
platform: x64
install:
- choco install golang --version "%GOVERSION%"
- choco install make
- cd "%GOPATH%\src\github.com\influxdata\telegraf"
- git config --system core.longpaths true

View File

@ -20,9 +20,23 @@ For client TLS support we have the following options:
# insecure_skip_verify = false
```
### Server Configuration
The server TLS configuration provides support for TLS mutual authentication:
```toml
## Set one or more allowed client CA certificate file names to
## enable mutually authenticated TLS connections.
# tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]
## Add service certificate and key.
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
```
#### Advanced Configuration
For plugins using the standard client configuration you can also set several
For plugins using the standard server configuration you can also set several
advanced settings. These options are not included in the sample configuration
for the interest of brevity.
@ -47,14 +61,14 @@ for the interest of brevity.
## "TLS_RSA_WITH_AES_128_CBC_SHA256",
## "TLS_RSA_WITH_AES_128_CBC_SHA",
## "TLS_RSA_WITH_AES_256_CBC_SHA"
# ]
## ]
# tls_cipher_suites = []
## Minimum TLS version that is acceptable.
# tls_min_version = "TLS10"
## Maximum SSL/TLS version that is acceptable.
# tls_max_version = "TLS12"
# tls_max_version = "TLS13"
```
Cipher suites for use with `tls_cipher_suites`:
@ -80,8 +94,6 @@ Cipher suites for use with `tls_cipher_suites`:
- `TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384`
- `TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305`
- `TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305`
TLS 1.3 cipher suites require Telegraf 1.12 and Go 1.12 or later:
- `TLS_AES_128_GCM_SHA256`
- `TLS_AES_256_GCM_SHA384`
- `TLS_CHACHA20_POLY1305_SHA256`
@ -90,24 +102,4 @@ TLS versions for use with `tls_min_version` or `tls_max_version`:
- `TLS10`
- `TLS11`
- `TLS12`
- `TLS13` (Telegraf 1.12 and Go 1.12 required, must enable TLS 1.3 using environment variables)
### TLS 1.3
TLS 1.3 is available only on an opt-in basis in Go 1.12. To enable it, set the
GODEBUG environment variable (comma-separated key=value options) such that it
includes "tls13=1".
### Server Configuration
The server TLS configuration provides support for TLS mutual authentication:
```toml
## Set one or more allowed client CA certificate file names to
## enable mutually authenticated TLS connections.
# tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]
## Add service certificate and key.
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
```
- `TLS13`

View File

@ -6,6 +6,7 @@ var tlsVersionMap = map[string]uint16{
"TLS10": tls.VersionTLS10,
"TLS11": tls.VersionTLS11,
"TLS12": tls.VersionTLS12,
"TLS13": tls.VersionTLS13,
}
var tlsCipherMap = map[string]uint16{
@ -31,4 +32,7 @@ var tlsCipherMap = map[string]uint16{
"TLS_RSA_WITH_RC4_128_SHA": tls.TLS_RSA_WITH_RC4_128_SHA,
"TLS_ECDHE_RSA_WITH_RC4_128_SHA": tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA,
"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA": tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
"TLS_AES_128_GCM_SHA256": tls.TLS_AES_128_GCM_SHA256,
"TLS_AES_256_GCM_SHA384": tls.TLS_AES_256_GCM_SHA384,
"TLS_CHACHA20_POLY1305_SHA256": tls.TLS_CHACHA20_POLY1305_SHA256,
}

View File

@ -1,12 +0,0 @@
// +build go1.12
package tls
import "crypto/tls"
func init() {
tlsVersionMap["TLS13"] = tls.VersionTLS13
tlsCipherMap["TLS_AES_128_GCM_SHA256"] = tls.TLS_AES_128_GCM_SHA256
tlsCipherMap["TLS_AES_256_GCM_SHA384"] = tls.TLS_AES_256_GCM_SHA384
tlsCipherMap["TLS_CHACHA20_POLY1305_SHA256"] = tls.TLS_CHACHA20_POLY1305_SHA256
}

View File

@ -1,5 +1,3 @@
// +build go1.11
package apcupsd
import (

View File

@ -205,6 +205,10 @@ func (ch *ClickHouse) Gather(acc telegraf.Accumulator) (err error) {
return nil
}
func (ch *ClickHouse) Stop() {
ch.client.CloseIdleConnections()
}
func (ch *ClickHouse) clusterIncludeExcludeFilter() string {
if len(ch.ClusterInclude) == 0 && len(ch.ClusterExclude) == 0 {
return ""

View File

@ -1,6 +0,0 @@
// +build !go1.12
package clickhouse
// Stop ClickHouse input service
func (ch *ClickHouse) Stop() {}

View File

@ -1,8 +0,0 @@
// +build go1.12
package clickhouse
// Stop ClickHouse input service
func (ch *ClickHouse) Stop() {
ch.client.CloseIdleConnections()
}

View File

@ -1,28 +0,0 @@
FROM golang:1.12.17
RUN chmod -R 755 "$GOPATH"
RUN DEBIAN_FRONTEND=noninteractive \
apt update && apt install -y --no-install-recommends \
autoconf \
git \
libtool \
locales \
make \
python-boto \
rpm \
ruby \
ruby-dev \
zip && \
rm -rf /var/lib/apt/lists/*
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
RUN locale-gen C.UTF-8 || true
ENV LANG=C.UTF-8
RUN gem install fpm
RUN go get -d github.com/golang/dep && \
cd src/github.com/golang/dep && \
git checkout -q v0.5.0 && \
go install -ldflags="-X main.version=v0.5.0" ./cmd/dep

View File

@ -1,4 +1,4 @@
FROM golang:1.13.8
FROM golang:1.13.11
RUN chmod -R 755 "$GOPATH"

View File

@ -1,4 +1,4 @@
FROM golang:1.9.7
FROM golang:1.14.3
RUN chmod -R 755 "$GOPATH"
@ -21,8 +21,3 @@ RUN locale-gen C.UTF-8 || true
ENV LANG=C.UTF-8
RUN gem install fpm
RUN go get -d github.com/golang/dep && \
cd src/github.com/golang/dep && \
git checkout -q v0.5.0 && \
go install -ldflags="-X main.version=v0.5.0" ./cmd/dep