From a0efd3b7fcc9a46721613147f5dd2f0b9530349d Mon Sep 17 00:00:00 2001 From: Adam Chalkley Date: Tue, 13 Aug 2024 17:05:14 -0500 Subject: [PATCH] Add Go 1.23 mirror img, fix STABLE/OLDSTABLE tags - add Go 1.23 series mirror image Dockerfile - update Makefile - move Go 1.21 mirror build image to legacy section - set Go 1.22 mirror build image as "olstable" tag - add entry to build Go 1.23 series mirror image - set Go 1.23 mirror build image as "stable" tag --- Makefile | 47 +++++++++++++++++++++++++++++------------- mirror/1.23/Dockerfile | 28 +++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 14 deletions(-) create mode 100644 mirror/1.23/Dockerfile diff --git a/Makefile b/Makefile index b4c31c80..e7132c72 100644 --- a/Makefile +++ b/Makefile @@ -62,6 +62,7 @@ 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_MIRROR_BUILD_GO123 = go-ci-mirror-build-go1.23 DOCKER_IMAGE_NAME_OLDSTABLE_CGO-MINGW-W64_BUILDX86 = go-ci-oldstable-cgo-mingw-w64-buildx86 DOCKER_IMAGE_NAME_OLDSTABLE_CGO-MINGW-W64_BUILDX64 = go-ci-oldstable-cgo-mingw-w64-buildx64 @@ -490,6 +491,20 @@ legacy-mirror-build: pre-build --label=$(DOCKER_IMAGE_CREATED_LABEL) @echo "Completed build of $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120) release" + @echo "Building $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121) release" + docker image build \ + --pull \ + --no-cache \ + mirror/1.21/ \ + -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_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_GO121) release" + @docker image ls --filter "label=$(DOCKER_IMAGE_OWNER_LABEL)" @echo "Completed build of legacy-mirror-build images" @@ -500,41 +515,41 @@ stable-mirror-build: pre-build @echo "Building stable-mirror-build images" - @echo "Building $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121) release" + @echo "Building $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122) release" 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_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_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_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_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 "Building $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122) release" + @echo "Building $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO123) release" docker image build \ --pull \ --no-cache \ - mirror/1.22/ \ + mirror/1.23/ \ -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_GO122) \ - -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122)-$(REPO_VERSION) \ + -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO123) \ + -t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO123)-$(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_GO122) \ - -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122)-$(REPO_VERSION) \ + -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO123) \ + -t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO123)-$(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_GO122) release" + @echo "Completed build of $(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO123) release" @echo "Completed build of stable-mirror-build images" @@ -684,6 +699,8 @@ upload-mirror-images: @docker push $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121)-$(REPO_VERSION) @docker push $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122) @docker push $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122)-$(REPO_VERSION) + @docker push $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO123) + @docker push $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO123)-$(REPO_VERSION) @echo "Completed mirror Docker container image uploads to $(GITHUB_IMAGE_REGISTRY)" @@ -713,6 +730,8 @@ upload-mirror-images: @docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO121)-$(REPO_VERSION) @docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122) @docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO122)-$(REPO_VERSION) + @docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO123) + @docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD_GO123)-$(REPO_VERSION) @echo "Completed mirror Docker container image uploads to $(DOCKER_IMAGE_REGISTRY)" diff --git a/mirror/1.23/Dockerfile b/mirror/1.23/Dockerfile new file mode 100644 index 00000000..8e83a38e --- /dev/null +++ b/mirror/1.23/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.23.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.23" +LABEL org.opencontainers.image.description="Docker image intended to mirror \ + latest upstream golang image for the Go 1.23 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"