chore: Update to go1.22.0 (#14697)
This commit is contained in:
parent
0338bd03a0
commit
f5cf3ff4b5
|
|
@ -8,7 +8,7 @@ executors:
|
|||
working_directory: '/go/src/github.com/influxdata/telegraf'
|
||||
resource_class: large
|
||||
docker:
|
||||
- image: 'quay.io/influxdb/telegraf-ci:1.21.6'
|
||||
- image: 'quay.io/influxdb/telegraf-ci:1.22.0'
|
||||
environment:
|
||||
GOFLAGS: -p=4
|
||||
mac:
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ jobs:
|
|||
- name: Scan for Vulnerabilities in Code
|
||||
uses: golang/govulncheck-action@v1
|
||||
with:
|
||||
go-version-input: 1.21.6
|
||||
go-version-input: 1.22.0
|
||||
go-package: ./...
|
||||
|
|
|
|||
4
Makefile
4
Makefile
|
|
@ -249,8 +249,8 @@ plugins/parsers/influx/machine.go: plugins/parsers/influx/machine.go.rl
|
|||
|
||||
.PHONY: ci
|
||||
ci:
|
||||
docker build -t quay.io/influxdb/telegraf-ci:1.21.6 - < scripts/ci.docker
|
||||
docker push quay.io/influxdb/telegraf-ci:1.21.6
|
||||
docker build -t quay.io/influxdb/telegraf-ci:1.22.0 - < scripts/ci.docker
|
||||
docker push quay.io/influxdb/telegraf-ci:1.22.0
|
||||
|
||||
.PHONY: install
|
||||
install: $(buildbin)
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ sudo yum install telegraf
|
|||
|
||||
### Build From Source
|
||||
|
||||
Telegraf requires Go version 1.21 or newer and the Makefile requires GNU make.
|
||||
Telegraf requires Go version 1.22 or newer and the Makefile requires GNU make.
|
||||
|
||||
On Windows, the makefile requires the use of a bash terminal to support all makefile targets.
|
||||
An easy option to get bash for windows is using the version that comes with [git for windows](https://gitforwindows.org/).
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -1,6 +1,6 @@
|
|||
module github.com/influxdata/telegraf
|
||||
|
||||
go 1.21
|
||||
go 1.22
|
||||
|
||||
require (
|
||||
cloud.google.com/go/bigquery v1.58.0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.21.6
|
||||
FROM golang:1.22.0
|
||||
|
||||
RUN chmod -R 755 "$GOPATH"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
set -eux
|
||||
|
||||
GO_VERSION="1.21.6"
|
||||
GO_VERSION="1.22.0"
|
||||
GO_ARCH="linux-amd64"
|
||||
# from https://golang.org/dl
|
||||
GO_VERSION_SHA="3f934f40ac360b9c01f616a9aa1796d227d8b0328bf64cb045c7b8c4ee9caea4"
|
||||
GO_VERSION_SHA="f6c8a87aa03b92c4b0bf3d558e28ea03006eb29db78917daec5cfb6ec1046265"
|
||||
|
||||
# Download Go and verify Go tarball
|
||||
setup_go () {
|
||||
|
|
@ -22,6 +22,7 @@ setup_go () {
|
|||
|
||||
if command -v go >/dev/null 2>&1; then
|
||||
echo "Go is already installed"
|
||||
cd
|
||||
v=$(go version | { read -r _ _ v _; echo "${v#go}"; })
|
||||
echo "$v is installed, required version is ${GO_VERSION}"
|
||||
if [ "$v" != ${GO_VERSION} ]; then
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
set -eux
|
||||
|
||||
ARCH=$(uname -m)
|
||||
GO_VERSION="1.21.6"
|
||||
GO_VERSION_SHA_arm64="0ff541fb37c38e5e5c5bcecc8f4f43c5ffd5e3a6c33a5d3e4003ded66fcfb331" # from https://golang.org/dl
|
||||
GO_VERSION_SHA_amd64="31d6ecca09010ab351e51343a5af81d678902061fee871f912bdd5ef4d778850" # from https://golang.org/dl
|
||||
GO_VERSION="1.22.0"
|
||||
GO_VERSION_SHA_arm64="bf8e388b09134164717cd52d3285a4ab3b68691b80515212da0e9f56f518fb1e" # from https://golang.org/dl
|
||||
GO_VERSION_SHA_amd64="ebca81df938d2d1047cc992be6c6c759543cf309d401b86af38a6aed3d4090f4" # from https://golang.org/dl
|
||||
|
||||
if [ "$ARCH" = 'arm64' ]; then
|
||||
GO_ARCH="darwin-arm64"
|
||||
|
|
@ -38,6 +38,7 @@ setup_go () {
|
|||
|
||||
if command -v go >/dev/null 2>&1; then
|
||||
echo "Go is already installed"
|
||||
cd
|
||||
v=$(go version | { read -r _ _ v _; echo "${v#go}"; })
|
||||
echo "$v is installed, required version is ${GO_VERSION}"
|
||||
if [ "$v" != ${GO_VERSION} ]; then
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -eux
|
||||
|
||||
GO_VERSION="1.21.6"
|
||||
GO_VERSION="1.22.0"
|
||||
|
||||
setup_go () {
|
||||
choco upgrade golang --allow-downgrade --version=${GO_VERSION}
|
||||
|
|
@ -10,6 +10,7 @@ setup_go () {
|
|||
|
||||
if command -v go >/dev/null 2>&1; then
|
||||
echo "Go is already installed"
|
||||
cd
|
||||
v=$(go version | { read -r _ _ v _; echo "${v#go}"; })
|
||||
echo "$v is installed, required version is ${GO_VERSION}"
|
||||
if [ "$v" != ${GO_VERSION} ]; then
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ func (p *pki) TLSMinVersion() string {
|
|||
}
|
||||
|
||||
func (p *pki) TLSMaxVersion() string {
|
||||
return "TLS12"
|
||||
return "TLS13"
|
||||
}
|
||||
|
||||
func (p *pki) ReadClientCert() string {
|
||||
|
|
|
|||
Loading…
Reference in New Issue