chore: Update to go1.21.6 (#14559)

This commit is contained in:
Joshua Powers 2024-01-15 08:07:14 -07:00 committed by GitHub
parent aa19445076
commit 7253fcfeb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 21 deletions

View File

@ -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.5'
- image: 'quay.io/influxdb/telegraf-ci:1.21.6'
environment:
GOFLAGS: -p=4
mac:

View File

@ -15,5 +15,5 @@ jobs:
- name: Scan for Vulnerabilities in Code
uses: golang/govulncheck-action@v1
with:
go-version-input: 1.21.5
go-version-input: 1.21.6
go-package: ./...

View File

@ -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.5 - < scripts/ci.docker
docker push quay.io/influxdb/telegraf-ci:1.21.5
docker build -t quay.io/influxdb/telegraf-ci:1.21.6 - < scripts/ci.docker
docker push quay.io/influxdb/telegraf-ci:1.21.6
.PHONY: install
install: $(buildbin)

View File

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

View File

@ -2,10 +2,10 @@
set -eux
GO_VERSION="1.21.5"
GO_VERSION="1.21.6"
GO_ARCH="linux-amd64"
# from https://golang.org/dl
GO_VERSION_SHA="e2bc0b3e4b64111ec117295c088bde5f00eeed1567999ff77bc859d7df70078e"
GO_VERSION_SHA="3f934f40ac360b9c01f616a9aa1796d227d8b0328bf64cb045c7b8c4ee9caea4"
# Download Go and verify Go tarball
setup_go () {

View File

@ -3,9 +3,9 @@
set -eux
ARCH=$(uname -m)
GO_VERSION="1.21.5"
GO_VERSION_SHA_arm64="d0f8ac0c4fb3efc223a833010901d02954e3923cfe2c9a2ff0e4254a777cc9cc" # from https://golang.org/dl
GO_VERSION_SHA_amd64="a2e1d5743e896e5fe1e7d96479c0a769254aed18cf216cf8f4c3a2300a9b3923" # from https://golang.org/dl
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
if [ "$ARCH" = 'arm64' ]; then
GO_ARCH="darwin-arm64"
@ -23,17 +23,17 @@ sudo mkdir -p ${path}
# it is slow to update and we can't pull specific minor versions.)
setup_go () {
echo "installing go"
curl -L https://golang.org/dl/go${GO_VERSION}.${GO_ARCH}.tar.gz --output go${GO_VERSION}.${GO_ARCH}.tar.gz
curl -L "https://golang.org/dl/go${GO_VERSION}.${GO_ARCH}.tar.gz" --output "go${GO_VERSION}.${GO_ARCH}.tar.gz"
if ! echo "${GO_VERSION_SHA} go${GO_VERSION}.${GO_ARCH}.tar.gz" | shasum --algorithm 256 --check -; then
echo "Checksum failed" >&2
exit 1
fi
sudo rm -rf ${path}/go
sudo tar -C $path -xzf go${GO_VERSION}.${GO_ARCH}.tar.gz
sudo rm -rf "${path}/go"
sudo tar -C "$path" -xzf "go${GO_VERSION}.${GO_ARCH}.tar.gz"
sudo mkdir -p /usr/local/bin
sudo ln -sf ${path}/go/bin/go /usr/local/bin/go
sudo ln -sf ${path}/go/bin/gofmt /usr/local/bin/gofmt
sudo ln -sf "${path}/go/bin/go" /usr/local/bin/go
sudo ln -sf "${path}/go/bin/gofmt" /usr/local/bin/gofmt
}
if command -v go >/dev/null 2>&1; then

View File

@ -2,7 +2,7 @@
set -eux
GO_VERSION="1.21.5"
GO_VERSION="1.21.6"
setup_go () {
choco upgrade golang --allow-downgrade --version=${GO_VERSION}

View File

@ -149,11 +149,6 @@ func main() {
Regex: `(quay\.io\/influxdb\/telegraf-ci):(\d.\d*.\d)`,
Replace: fmt.Sprintf("$1:%s", version),
},
{
FileName: ".circleci/config.yml",
Regex: `(default): (\d.\d*.\d)`,
Replace: fmt.Sprintf("$1: %s", version),
},
{
FileName: ".github/workflows/govulncheck.yml",
Regex: `(go-version-input).*`,