From e465ebf2f34232836f01178eb80a021136a0947e Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 25 Jul 2023 08:36:45 +0200 Subject: [PATCH] update to go1.21.1, and fix download-URL This required changes to the download-URL, as downloads are now provided using the full version (including the `.0` patch version); curl -sI https://go.dev/dl/go1.21.windows-amd64.zip | grep 'location' location: https://dl.google.com/go/go1.21.windows-amd64.zip curl -sI https://dl.google.com/go/go1.21.windows-amd64.zip HTTP/2 404 # ... curl -sI https://dl.google.com/go/go1.21.0.windows-amd64.zip HTTP/2 200 # ... Unfortunately this also means that the GO_VERSION can no longer be set to versions lower than 1.21.0 (without additional changes), because older versions do NOT provide the `.0` version, and Go 1.21.0 and up, no longer provides URLs _without_ the `.0` version. Co-authored-by: Bjorn Neergaard Signed-off-by: Bjorn Neergaard Signed-off-by: Sebastiaan van Stijn --- .github/workflows/.windows.yml | 2 +- .github/workflows/buildkit.yml | 2 +- .github/workflows/test.yml | 2 +- Dockerfile | 2 +- Dockerfile.simple | 2 +- Dockerfile.windows | 4 ++-- hack/dockerfiles/generate-files.Dockerfile | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/.windows.yml b/.github/workflows/.windows.yml index 64bf033a23..320533042a 100644 --- a/.github/workflows/.windows.yml +++ b/.github/workflows/.windows.yml @@ -15,7 +15,7 @@ on: default: false env: - GO_VERSION: "1.20.8" + GO_VERSION: "1.21.1" GOTESTLIST_VERSION: v0.3.1 TESTSTAT_VERSION: v0.1.3 WINDOWS_BASE_IMAGE: mcr.microsoft.com/windows/servercore diff --git a/.github/workflows/buildkit.yml b/.github/workflows/buildkit.yml index 7321001b27..bf5c18dadd 100644 --- a/.github/workflows/buildkit.yml +++ b/.github/workflows/buildkit.yml @@ -13,7 +13,7 @@ on: pull_request: env: - GO_VERSION: "1.20.8" + GO_VERSION: "1.21.1" DESTDIR: ./build jobs: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3777c2c91f..59d51a057c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ on: pull_request: env: - GO_VERSION: "1.20.8" + GO_VERSION: "1.21.1" GOTESTLIST_VERSION: v0.3.1 TESTSTAT_VERSION: v0.1.3 ITG_CLI_MATRIX_SIZE: 6 diff --git a/Dockerfile b/Dockerfile index c4cc8289ab..51f7c40e18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG GO_VERSION=1.20.8 +ARG GO_VERSION=1.21.1 ARG BASE_DEBIAN_DISTRO="bullseye" ARG GOLANG_IMAGE="golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO}" ARG XX_VERSION=1.2.1 diff --git a/Dockerfile.simple b/Dockerfile.simple index e21a2ca384..4f5c4a5f0d 100644 --- a/Dockerfile.simple +++ b/Dockerfile.simple @@ -5,7 +5,7 @@ # This represents the bare minimum required to build and test Docker. -ARG GO_VERSION=1.20.8 +ARG GO_VERSION=1.21.1 ARG BASE_DEBIAN_DISTRO="bullseye" ARG GOLANG_IMAGE="golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO}" diff --git a/Dockerfile.windows b/Dockerfile.windows index 41575b2d4e..1e26603d24 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -161,7 +161,7 @@ FROM ${WINDOWS_BASE_IMAGE}:${WINDOWS_BASE_IMAGE_TAG} # Use PowerShell as the default shell SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ARG GO_VERSION=1.20.8 +ARG GO_VERSION=1.21.1 ARG GOTESTSUM_VERSION=v1.8.2 ARG GOWINRES_VERSION=v0.3.0 ARG CONTAINERD_VERSION=v1.7.6 @@ -220,7 +220,7 @@ RUN ` Download-File $location C:\gitsetup.zip; ` ` Write-Host INFO: Downloading go...; ` - $dlGoVersion=$Env:GO_VERSION -replace '\.0$',''; ` + $dlGoVersion=$Env:GO_VERSION; ` Download-File "https://go.dev/dl/go${dlGoVersion}.windows-amd64.zip" C:\go.zip; ` ` Write-Host INFO: Downloading compiler 1 of 3...; ` diff --git a/hack/dockerfiles/generate-files.Dockerfile b/hack/dockerfiles/generate-files.Dockerfile index 955cec0766..8099b7fe56 100644 --- a/hack/dockerfiles/generate-files.Dockerfile +++ b/hack/dockerfiles/generate-files.Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG GO_VERSION=1.20.8 +ARG GO_VERSION=1.21.1 ARG BASE_DEBIAN_DISTRO="bullseye" ARG PROTOC_VERSION=3.11.4