From 7c41d916963a622e7fafbca9916b8fc9a149c053 Mon Sep 17 00:00:00 2001 From: Adam Chalkley Date: Fri, 9 Feb 2024 07:31:32 -0600 Subject: [PATCH] Add Go 1.22 mirror img, fix STABLE/OLDSTABLE tags - add Go 1.22 series mirror image Dockerfile - update Makefile - move Go 1.20 mirror build image to legacy section - set Go 1.21 mirror build image as "olstable" tag - add entry to build Go 1.22 series mirror image - set Go 1.22 mirror build image as "stable" tag refs GH-1372 --- Makefile | 47 +++++++++++++++++++++++++++++------------- mirror/1.22/Dockerfile | 28 +++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 14 deletions(-) create mode 100644 mirror/1.22/Dockerfile diff --git a/Makefile b/Makefile index 73bb17de..43e871a5 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,7 @@ DOCKER_IMAGE_NAME_MIRROR_BUILD_GO118 = go-ci-mirror-build-go1.18 DOCKER_IMAGE_NAME_MIRROR_BUILD_GO119 = go-ci-mirror-build-go1.19 DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120 = go-ci-mirror-build-go1.20 DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121 = go-ci-mirror-build-go1.21 +DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122 = go-ci-mirror-build-go1.22 DOCKER_IMAGE_NAME_CGO-MINGW-W64_BUILD = go-ci-stable-cgo-mingw-w64-build DOCKER_IMAGE_NAME_OLDSTABLE_ALPINE_BUILDX86 = go-ci-oldstable-alpine-buildx86 @@ -379,6 +380,20 @@ legacy-mirror-build: pre-build --label=$(DOCKER_IMAGE_OWNER_LABEL) @echo "Completed build of $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO119) release" + @echo "Building $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120) release" + sudo docker image build \ + --pull \ + --no-cache \ + mirror/1.20/ \ + -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120) \ + -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120)-$(REPO_VERSION) \ + -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120) \ + -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120)-$(REPO_VERSION) \ + --label=$(DOCKER_IMAGE_OWNER_LABEL) \ + --label=$(DOCKER_IMAGE_REVISION_LABEL) \ + --label=$(DOCKER_IMAGE_CREATED_LABEL) + @echo "Completed build of $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120) release" + @sudo docker image ls --filter "label=$(DOCKER_IMAGE_OWNER_LABEL)" @echo "Completed build of legacy-mirror-build images" @@ -389,41 +404,41 @@ stable-mirror-build: pre-build @echo "Building stable-mirror-build images" - @echo "Building $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120) release" + @echo "Building $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121) release" sudo docker image build \ --pull \ --no-cache \ - mirror/1.20/ \ + mirror/1.21/ \ -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_OLDSTABLE_MIRROR_BUILD) \ -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_OLDSTABLE_MIRROR_BUILD)-$(REPO_VERSION) \ - -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120) \ - -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120)-$(REPO_VERSION) \ + -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121) \ + -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121)-$(REPO_VERSION) \ -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_OLDSTABLE_MIRROR_BUILD) \ -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_OLDSTABLE_MIRROR_BUILD)-$(REPO_VERSION) \ - -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120) \ - -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120)-$(REPO_VERSION) \ + -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121) \ + -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121)-$(REPO_VERSION) \ --label=$(DOCKER_IMAGE_OWNER_LABEL) \ --label=$(DOCKER_IMAGE_REVISION_LABEL) \ --label=$(DOCKER_IMAGE_CREATED_LABEL) - @echo "Completed build of $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120) release" + @echo "Completed build of $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121) release" - @echo "Building $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121) release" + @echo "Building $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122) release" sudo docker image build \ --pull \ --no-cache \ - mirror/1.21/ \ + mirror/1.22/ \ -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_STABLE_MIRROR_BUILD) \ -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_STABLE_MIRROR_BUILD)-$(REPO_VERSION) \ - -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121) \ - -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121)-$(REPO_VERSION) \ + -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122) \ + -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122)-$(REPO_VERSION) \ -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_STABLE_MIRROR_BUILD) \ -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_STABLE_MIRROR_BUILD)-$(REPO_VERSION) \ - -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121) \ - -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121)-$(REPO_VERSION) \ + -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122) \ + -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122)-$(REPO_VERSION) \ --label=$(DOCKER_IMAGE_OWNER_LABEL) \ --label=$(DOCKER_IMAGE_REVISION_LABEL) \ --label=$(DOCKER_IMAGE_CREATED_LABEL) - @echo "Completed build of $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121) release" + @echo "Completed build of $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122) release" @echo "Completed build of stable-mirror-build images" @@ -582,6 +597,8 @@ upload: @sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120)-$(REPO_VERSION) @sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121) @sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121)-$(REPO_VERSION) + @sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122) + @sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122)-$(REPO_VERSION) @sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_OLDSTABLE) @sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_OLDSTABLE)-$(REPO_VERSION) @@ -643,6 +660,8 @@ upload: @sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120)-$(REPO_VERSION) @sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121) @sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121)-$(REPO_VERSION) + @sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122) + @sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122)-$(REPO_VERSION) @sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_OLDSTABLE) @sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_OLDSTABLE)-$(REPO_VERSION) diff --git a/mirror/1.22/Dockerfile b/mirror/1.22/Dockerfile new file mode 100644 index 00000000..97cfa0aa --- /dev/null +++ b/mirror/1.22/Dockerfile @@ -0,0 +1,28 @@ +# Copyright 2020 Adam Chalkley +# +# https://github.com/atc0005/go-ci +# +# Licensed under the MIT License. See LICENSE file in the project root for +# full license information. + +# https://hub.docker.com/_/golang + +FROM amd64/golang:1.22.0-bookworm + +# https://docs.github.com/en/packages/learn-github-packages/connecting-a-repository-to-a-package +LABEL org.opencontainers.image.source="https://github.com/atc0005/go-ci" + +# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys +LABEL org.opencontainers.image.documentation="https://github.com/atc0005/go-ci" +LABEL org.opencontainers.image.url="https://github.com/atc0005/go-ci" +LABEL org.opencontainers.image.title="go-ci-mirror-build-go1.22" +LABEL org.opencontainers.image.description="Docker image intended to mirror \ + latest upstream golang image for the Go 1.22 series. Used by \ + Makefile-driven test, linting and build tasks." +LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)" + +# Explicitly disable automatic fetching of Go toolchains newer than the +# version explicitly provided by this container image. +# +# https://github.com/atc0005/go-ci/issues/1188 +ENV GOTOOLCHAIN="local"