Update to Go 1.14.3 with testing using 1.13.11 (#7564)
This commit is contained in:
parent
bdbf57576a
commit
d27f676091
|
@ -4,14 +4,12 @@ defaults:
|
||||||
working_directory: '/go/src/github.com/influxdata/telegraf'
|
working_directory: '/go/src/github.com/influxdata/telegraf'
|
||||||
environment:
|
environment:
|
||||||
GOFLAGS: -p=8
|
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
|
go-1_13: &go-1_13
|
||||||
docker:
|
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
|
mac: &mac
|
||||||
macos:
|
macos:
|
||||||
xcode: 11.3.1
|
xcode: 11.3.1
|
||||||
|
@ -23,7 +21,7 @@ defaults:
|
||||||
version: 2
|
version: 2
|
||||||
jobs:
|
jobs:
|
||||||
deps:
|
deps:
|
||||||
<<: [ *defaults, *go-1_13 ]
|
<<: [ *defaults, *go-1_14 ]
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
|
@ -64,22 +62,22 @@ jobs:
|
||||||
- 'usr/local/bin/gofmt'
|
- 'usr/local/bin/gofmt'
|
||||||
- 'Users/distiller/go'
|
- 'Users/distiller/go'
|
||||||
|
|
||||||
test-go-1.12:
|
test-go-1.13:
|
||||||
<<: [ *defaults, *go-1_12 ]
|
<<: [ *defaults, *go-1_13 ]
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: '/go'
|
at: '/go'
|
||||||
- run: 'make'
|
- run: 'make'
|
||||||
- run: 'make test'
|
- run: 'make test'
|
||||||
test-go-1.12-386:
|
test-go-1.13-386:
|
||||||
<<: [ *defaults, *go-1_12 ]
|
<<: [ *defaults, *go-1_13 ]
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: '/go'
|
at: '/go'
|
||||||
- run: 'GOARCH=386 make'
|
- run: 'GOARCH=386 make'
|
||||||
- run: 'GOARCH=386 make test'
|
- run: 'GOARCH=386 make test'
|
||||||
test-go-1.13:
|
test-go-1.14:
|
||||||
<<: [ *defaults, *go-1_13 ]
|
<<: [ *defaults, *go-1_14 ]
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: '/go'
|
at: '/go'
|
||||||
|
@ -87,8 +85,8 @@ jobs:
|
||||||
- run: 'make check'
|
- run: 'make check'
|
||||||
- run: 'make check-deps'
|
- run: 'make check-deps'
|
||||||
- run: 'make test'
|
- run: 'make test'
|
||||||
test-go-1.13-386:
|
test-go-1.14-386:
|
||||||
<<: [ *defaults, *go-1_13 ]
|
<<: [ *defaults, *go-1_14 ]
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: '/go'
|
at: '/go'
|
||||||
|
@ -105,7 +103,7 @@ jobs:
|
||||||
- run: 'make test'
|
- run: 'make test'
|
||||||
|
|
||||||
package:
|
package:
|
||||||
<<: [ *defaults, *go-1_13 ]
|
<<: [ *defaults, *go-1_14 ]
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: '/go'
|
at: '/go'
|
||||||
|
@ -114,7 +112,7 @@ jobs:
|
||||||
path: './build'
|
path: './build'
|
||||||
destination: 'build'
|
destination: 'build'
|
||||||
release:
|
release:
|
||||||
<<: [ *defaults, *go-1_13 ]
|
<<: [ *defaults, *go-1_14 ]
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: '/go'
|
at: '/go'
|
||||||
|
@ -123,7 +121,7 @@ jobs:
|
||||||
path: './build'
|
path: './build'
|
||||||
destination: 'build'
|
destination: 'build'
|
||||||
nightly:
|
nightly:
|
||||||
<<: [ *defaults, *go-1_13 ]
|
<<: [ *defaults, *go-1_14 ]
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: '/go'
|
at: '/go'
|
||||||
|
@ -144,18 +142,6 @@ workflows:
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
- 'test-go-1.12':
|
|
||||||
requires:
|
|
||||||
- 'deps'
|
|
||||||
filters:
|
|
||||||
tags:
|
|
||||||
only: /.*/
|
|
||||||
- 'test-go-1.12-386':
|
|
||||||
requires:
|
|
||||||
- 'deps'
|
|
||||||
filters:
|
|
||||||
tags:
|
|
||||||
only: /.*/
|
|
||||||
- 'test-go-1.13':
|
- 'test-go-1.13':
|
||||||
requires:
|
requires:
|
||||||
- 'deps'
|
- 'deps'
|
||||||
|
@ -168,6 +154,18 @@ workflows:
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
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':
|
- 'test-go-1.13-darwin':
|
||||||
requires:
|
requires:
|
||||||
- 'macdeps'
|
- 'macdeps'
|
||||||
|
@ -176,16 +174,16 @@ workflows:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
- 'package':
|
- 'package':
|
||||||
requires:
|
requires:
|
||||||
- 'test-go-1.12'
|
|
||||||
- 'test-go-1.12-386'
|
|
||||||
- 'test-go-1.13'
|
- 'test-go-1.13'
|
||||||
- 'test-go-1.13-386'
|
- 'test-go-1.13-386'
|
||||||
|
- 'test-go-1.14'
|
||||||
|
- 'test-go-1.14-386'
|
||||||
- 'release':
|
- 'release':
|
||||||
requires:
|
requires:
|
||||||
- 'test-go-1.12'
|
|
||||||
- 'test-go-1.12-386'
|
|
||||||
- 'test-go-1.13'
|
- 'test-go-1.13'
|
||||||
- 'test-go-1.13-386'
|
- 'test-go-1.13-386'
|
||||||
|
- 'test-go-1.14'
|
||||||
|
- 'test-go-1.14-386'
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
|
@ -194,24 +192,24 @@ workflows:
|
||||||
nightly:
|
nightly:
|
||||||
jobs:
|
jobs:
|
||||||
- 'deps'
|
- 'deps'
|
||||||
- 'test-go-1.12':
|
|
||||||
requires:
|
|
||||||
- 'deps'
|
|
||||||
- 'test-go-1.12-386':
|
|
||||||
requires:
|
|
||||||
- 'deps'
|
|
||||||
- 'test-go-1.13':
|
- 'test-go-1.13':
|
||||||
requires:
|
requires:
|
||||||
- 'deps'
|
- 'deps'
|
||||||
- 'test-go-1.13-386':
|
- 'test-go-1.13-386':
|
||||||
requires:
|
requires:
|
||||||
- 'deps'
|
- 'deps'
|
||||||
|
- 'test-go-1.14':
|
||||||
|
requires:
|
||||||
|
- 'deps'
|
||||||
|
- 'test-go-1.14-386':
|
||||||
|
requires:
|
||||||
|
- 'deps'
|
||||||
- 'nightly':
|
- 'nightly':
|
||||||
requires:
|
requires:
|
||||||
- 'test-go-1.12'
|
|
||||||
- 'test-go-1.12-386'
|
|
||||||
- 'test-go-1.13'
|
- 'test-go-1.13'
|
||||||
- 'test-go-1.13-386'
|
- 'test-go-1.13-386'
|
||||||
|
- 'test-go-1.14'
|
||||||
|
- 'test-go-1.14-386'
|
||||||
triggers:
|
triggers:
|
||||||
- schedule:
|
- schedule:
|
||||||
cron: "0 7 * * *"
|
cron: "0 7 * * *"
|
||||||
|
|
|
@ -51,9 +51,9 @@ Ansible role: https://github.com/rossmcdonald/telegraf
|
||||||
|
|
||||||
### From Source:
|
### 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:
|
2. Clone the Telegraf repository:
|
||||||
```
|
```
|
||||||
cd ~/src
|
cd ~/src
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
version: "{build}"
|
version: "{build}"
|
||||||
|
|
||||||
|
image: Visual Studio 2019
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- C:\gopath\pkg\mod -> go.sum
|
- C:\gopath\pkg\mod -> go.sum
|
||||||
- C:\ProgramData\chocolatey\bin -> appveyor.yml
|
- C:\ProgramData\chocolatey\bin -> appveyor.yml
|
||||||
|
@ -8,13 +10,13 @@ cache:
|
||||||
clone_folder: C:\gopath\src\github.com\influxdata\telegraf
|
clone_folder: C:\gopath\src\github.com\influxdata\telegraf
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
GOVERSION: 1.13.8
|
|
||||||
GOPATH: C:\gopath
|
GOPATH: C:\gopath
|
||||||
|
|
||||||
|
stack: go 1.14
|
||||||
|
|
||||||
platform: x64
|
platform: x64
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- choco install golang --version "%GOVERSION%"
|
|
||||||
- choco install make
|
- choco install make
|
||||||
- cd "%GOPATH%\src\github.com\influxdata\telegraf"
|
- cd "%GOPATH%\src\github.com\influxdata\telegraf"
|
||||||
- git config --system core.longpaths true
|
- git config --system core.longpaths true
|
||||||
|
|
44
docs/TLS.md
44
docs/TLS.md
|
@ -20,9 +20,23 @@ For client TLS support we have the following options:
|
||||||
# insecure_skip_verify = false
|
# 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
|
#### 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
|
advanced settings. These options are not included in the sample configuration
|
||||||
for the interest of brevity.
|
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_SHA256",
|
||||||
## "TLS_RSA_WITH_AES_128_CBC_SHA",
|
## "TLS_RSA_WITH_AES_128_CBC_SHA",
|
||||||
## "TLS_RSA_WITH_AES_256_CBC_SHA"
|
## "TLS_RSA_WITH_AES_256_CBC_SHA"
|
||||||
# ]
|
## ]
|
||||||
# tls_cipher_suites = []
|
# tls_cipher_suites = []
|
||||||
|
|
||||||
## Minimum TLS version that is acceptable.
|
## Minimum TLS version that is acceptable.
|
||||||
# tls_min_version = "TLS10"
|
# tls_min_version = "TLS10"
|
||||||
|
|
||||||
## Maximum SSL/TLS version that is acceptable.
|
## Maximum SSL/TLS version that is acceptable.
|
||||||
# tls_max_version = "TLS12"
|
# tls_max_version = "TLS13"
|
||||||
```
|
```
|
||||||
|
|
||||||
Cipher suites for use with `tls_cipher_suites`:
|
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_ECDSA_WITH_AES_256_GCM_SHA384`
|
||||||
- `TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305`
|
- `TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305`
|
||||||
- `TLS_ECDHE_ECDSA_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_128_GCM_SHA256`
|
||||||
- `TLS_AES_256_GCM_SHA384`
|
- `TLS_AES_256_GCM_SHA384`
|
||||||
- `TLS_CHACHA20_POLY1305_SHA256`
|
- `TLS_CHACHA20_POLY1305_SHA256`
|
||||||
|
@ -90,24 +102,4 @@ TLS versions for use with `tls_min_version` or `tls_max_version`:
|
||||||
- `TLS10`
|
- `TLS10`
|
||||||
- `TLS11`
|
- `TLS11`
|
||||||
- `TLS12`
|
- `TLS12`
|
||||||
- `TLS13` (Telegraf 1.12 and Go 1.12 required, must enable TLS 1.3 using environment variables)
|
- `TLS13`
|
||||||
|
|
||||||
### 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"
|
|
||||||
```
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ var tlsVersionMap = map[string]uint16{
|
||||||
"TLS10": tls.VersionTLS10,
|
"TLS10": tls.VersionTLS10,
|
||||||
"TLS11": tls.VersionTLS11,
|
"TLS11": tls.VersionTLS11,
|
||||||
"TLS12": tls.VersionTLS12,
|
"TLS12": tls.VersionTLS12,
|
||||||
|
"TLS13": tls.VersionTLS13,
|
||||||
}
|
}
|
||||||
|
|
||||||
var tlsCipherMap = map[string]uint16{
|
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_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_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_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,
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
|
@ -1,5 +1,3 @@
|
||||||
// +build go1.11
|
|
||||||
|
|
||||||
package apcupsd
|
package apcupsd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -205,6 +205,10 @@ func (ch *ClickHouse) Gather(acc telegraf.Accumulator) (err error) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ch *ClickHouse) Stop() {
|
||||||
|
ch.client.CloseIdleConnections()
|
||||||
|
}
|
||||||
|
|
||||||
func (ch *ClickHouse) clusterIncludeExcludeFilter() string {
|
func (ch *ClickHouse) clusterIncludeExcludeFilter() string {
|
||||||
if len(ch.ClusterInclude) == 0 && len(ch.ClusterExclude) == 0 {
|
if len(ch.ClusterInclude) == 0 && len(ch.ClusterExclude) == 0 {
|
||||||
return ""
|
return ""
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
// +build !go1.12
|
|
||||||
|
|
||||||
package clickhouse
|
|
||||||
|
|
||||||
// Stop ClickHouse input service
|
|
||||||
func (ch *ClickHouse) Stop() {}
|
|
|
@ -1,8 +0,0 @@
|
||||||
// +build go1.12
|
|
||||||
|
|
||||||
package clickhouse
|
|
||||||
|
|
||||||
// Stop ClickHouse input service
|
|
||||||
func (ch *ClickHouse) Stop() {
|
|
||||||
ch.client.CloseIdleConnections()
|
|
||||||
}
|
|
|
@ -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
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM golang:1.13.8
|
FROM golang:1.13.11
|
||||||
|
|
||||||
RUN chmod -R 755 "$GOPATH"
|
RUN chmod -R 755 "$GOPATH"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM golang:1.9.7
|
FROM golang:1.14.3
|
||||||
|
|
||||||
RUN chmod -R 755 "$GOPATH"
|
RUN chmod -R 755 "$GOPATH"
|
||||||
|
|
||||||
|
@ -21,8 +21,3 @@ RUN locale-gen C.UTF-8 || true
|
||||||
ENV LANG=C.UTF-8
|
ENV LANG=C.UTF-8
|
||||||
|
|
||||||
RUN gem install fpm
|
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
|
|
Loading…
Reference in New Issue