Skip to content

Commit

Permalink
Merge pull request #1373 from atc0005/i1372-add-go1.22-mirror-image
Browse files Browse the repository at this point in the history
Add Go 1.22 mirror img, fix STABLE/OLDSTABLE tags
  • Loading branch information
atc0005 authored Feb 9, 2024
2 parents 7235c4c + 7c41d91 commit 05e5dc7
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 14 deletions.
47 changes: 33 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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"

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
28 changes: 28 additions & 0 deletions mirror/1.22/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 05e5dc7

Please sign in to comment.