Skip to content

Commit

Permalink
chore: Update to go1.21.6 (influxdata#14559)
Browse files Browse the repository at this point in the history
  • Loading branch information
powersj authored Jan 15, 2024
1 parent aa19445 commit 7253fcf
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ./...
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci.docker
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.5
FROM golang:1.21.6

RUN chmod -R 755 "$GOPATH"

Expand Down
4 changes: 2 additions & 2 deletions scripts/installgo_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
16 changes: 8 additions & 8 deletions scripts/installgo_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/installgo_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
5 changes: 0 additions & 5 deletions tools/update_goversion/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).*`,
Expand Down

0 comments on commit 7253fcf

Please sign in to comment.