Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebrand, update go-ci-stable-debian-build image #869

Merged
merged 1 commit into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ jobs:
- name: Build Alpine x86 image
run: make build-stable-alpine-buildx86

build_stable_debian_image_using_makefile:
name: Build stable Debian image using Makefile
build_stable_cgo-mingw-w64_image_using_makefile:
name: Build stable cgo-mingw-w64 image using Makefile
runs-on: ubuntu-latest
# Default: 360 minutes
timeout-minutes: 10
Expand All @@ -137,8 +137,8 @@ jobs:
- name: Install Ubuntu packages
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends make gcc bsdmainutils

- name: Build stable Debian image
run: make stable-debian-build
- name: Build stable cgo-mingw-w64 image
run: make stable-cgo-mingw-w64-build

build_stable_mirror_images_using_makefile:
name: Build stable mirror images using Makefile
Expand Down
51 changes: 20 additions & 31 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ DOCKER_IMAGE_REGISTRY_USER = atc0005
GITHUB_IMAGE_REGISTRY_USER = atc0005
DOCKER_IMAGE_REPO = go-ci
GITHUB_PROJECT_REPO = go-ci
DOCKER_IMAGE_NAME_DEBIAN_BUILD = go-ci-stable-debian-build
DOCKER_IMAGE_NAME_CGO-MINGW-W64_BUILD = go-ci-stable-cgo-mingw-w64-build
DOCKER_IMAGE_NAME_MIRROR_BUILD = go-ci-stable-mirror-build

DOCKER_IMAGE_NAME_MIRROR_BUILD_GO114 = go-ci-stable-mirror-build-go1.14
Expand All @@ -60,7 +60,7 @@ DOCKER_IMAGE_CREATED_LABEL = org.opencontainers.image.created="$(CREATED_TIME)
DOCKER_FILES = oldstable/Dockerfile \
stable/build/alpine-x64/Dockerfile \
stable/build/alpine-x86/Dockerfile \
stable/build/debian/Dockerfile \
stable/build/cgo-mingw-w64/Dockerfile \
stable/combined/Dockerfile \
unstable/Dockerfile \

Expand Down Expand Up @@ -99,8 +99,7 @@ clean:
@sudo docker image prune --force
@echo
@ echo "Removing temporary copies of linter config files"
@rm -vf {oldstable,unstable,stable/combined,stable/build/debian}/.markdownlint.yml
@rm -vf {stable/combined,stable/build/debian}/.golangci.yml
@rm -vf {oldstable,unstable,stable/combined}/.markdownlint.yml

.PHONY: linting
## linting: lint all Dockerfiles
Expand Down Expand Up @@ -169,23 +168,23 @@ build-stable-alpine-buildx86: pre-build
--label=$(DOCKER_IMAGE_CREATED_LABEL)
@echo "Completed build of stable-alpine-buildx86 release"

.PHONY: stable-debian-build
## stable-debian-build: Build Debian image
stable-debian-build: pre-build
.PHONY: stable-cgo-mingw-w64-build
## stable-cgo-mingw-w64-build: Build cgo-mingw-w64 image
stable-cgo-mingw-w64-build: pre-build

@echo "Building stable-debian-build release"
@echo "Building stable-cgo-mingw-w64-build release"
sudo docker image build \
--pull \
--no-cache \
stable/build/debian/ \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_DEBIAN_BUILD) \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_DEBIAN_BUILD)-$(REPO_VERSION) \
-t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_DEBIAN_BUILD) \
-t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_DEBIAN_BUILD)-$(REPO_VERSION) \
stable/build/cgo-mingw-w64/ \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_CGO-MINGW-W64_BUILD) \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_CGO-MINGW-W64_BUILD)-$(REPO_VERSION) \
-t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_CGO-MINGW-W64_BUILD) \
-t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_CGO-MINGW-W64_BUILD)-$(REPO_VERSION) \
--label=$(DOCKER_IMAGE_OWNER_LABEL) \
--label=$(DOCKER_IMAGE_REVISION_LABEL) \
--label=$(DOCKER_IMAGE_CREATED_LABEL)
@echo "Completed build of stable-debian-build release"
@echo "Completed build of stable-cgo-mingw-w64-build release"

.PHONY: legacy-mirror-build
## legacy-mirror-build: Build legacy mirror images
Expand Down Expand Up @@ -321,28 +320,18 @@ pre-build:
@echo "Building Docker container images"

@echo "Bundle linter config files to provide baseline default settings"
@for version in {oldstable,unstable,stable/combined,stable/build/debian}; do cp -vf .markdownlint.yml $$version/; done

# unstable container image has its own copy of the .golangci.yml file
# oldstable container image has its own copy of the .golangci.yml file
# stable container images share a copy of the .golangci.yml file
@for version in {stable/combined,stable/build/debian}; do cp -vf stable/.golangci.yml $$version/; done
@for version in {oldstable,unstable,stable/combined}; do cp -vf .markdownlint.yml $$version/; done

@echo "List Docker version"
@docker version


.PHONY: build
## build: build all current Docker container images (legacy not included)
build: pre-build build-stable build-stable-alpine-buildx64 build-stable-alpine-buildx86 stable-debian-build stable-mirror-build build-oldstable build-unstable
build: pre-build build-stable build-stable-alpine-buildx64 build-stable-alpine-buildx86 stable-cgo-mingw-w64-build stable-mirror-build build-oldstable build-unstable

@echo "Remove temporary copies of bundled files"
@rm -vf {oldstable,unstable,stable/combined,stable/build/debian}/.markdownlint.yml

# unstable container image has its own copy of this file
# oldstable container image has its own copy of this file
# stable variants share a copy of this file
@rm -vf {stable/combined,stable/build/debian}/.golangci.yml
@rm -vf {oldstable,unstable,stable/combined}/.markdownlint.yml

@echo "Finished building Docker container images"

Expand Down Expand Up @@ -373,8 +362,8 @@ upload:
@sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_ALPINE_BUILDX86)-$(REPO_VERSION)
@sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_ALPINE_BUILDX64)
@sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_ALPINE_BUILDX64)-$(REPO_VERSION)
@sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_DEBIAN_BUILD)
@sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_DEBIAN_BUILD)-$(REPO_VERSION)
@sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_CGO-MINGW-W64_BUILD)
@sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_CGO-MINGW-W64_BUILD)-$(REPO_VERSION)
@sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD)
@sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD)-$(REPO_VERSION)
@sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_STABLE_LINT_ONLY)
Expand All @@ -399,8 +388,8 @@ upload:
@sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_ALPINE_BUILDX86)-$(REPO_VERSION)
@sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_ALPINE_BUILDX64)
@sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_ALPINE_BUILDX64)-$(REPO_VERSION)
@sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_DEBIAN_BUILD)
@sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_DEBIAN_BUILD)-$(REPO_VERSION)
@sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_CGO-MINGW-W64_BUILD)
@sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_CGO-MINGW-W64_BUILD)-$(REPO_VERSION)
@sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD)
@sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_MIRROR_BUILD)-$(REPO_VERSION)
@sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_STABLE_LINT_ONLY)
Expand Down
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Tooling for linting, testing and building Go applications
- [`go-ci-stable`](#go-ci-stable)
- [`go-ci-stable-alpine-buildx86`](#go-ci-stable-alpine-buildx86)
- [`go-ci-stable-alpine-buildx64`](#go-ci-stable-alpine-buildx64)
- [`go-ci-stable-debian-build`](#go-ci-stable-debian-build)
- [`go-ci-stable-cgo-mingw-w64-build`](#go-ci-stable-cgo-mingw-w64-build)
- [`go-ci-stable-mirror-build-*`](#go-ci-stable-mirror-build-)
- [`go-ci-oldstable`](#go-ci-oldstable)
- [`go-ci-unstable`](#go-ci-unstable)
Expand Down Expand Up @@ -91,23 +91,14 @@ See these container image registries for the full listing of available images:
- same as `go-ci-stable-alpine-buildx86`, but specific to x64 architecture
- does not include linters

### `go-ci-stable-debian-build`
### `go-ci-stable-cgo-mingw-w64-build`

- built from the latest version of the current stable `golang` image.
- used for building Go applications, both directly and via `Makefile` builds.
- supports cross-platform, static cgo-enabled builds for Windows and Linux
- Windows 32-bit: `i686-w64-mingw32-gcc`
- Windows 64-bit: `x86_64-w64-mingw32-gcc`
- provides multiple linters
- see [Linting tools included](#linting-tools-included)

**NOTE**: The `go-ci-stable-debian-build` image is a candidate for removal.

Do you use the `go-ci-stable-debian-build` image? If so, please [provide
feedback](https://github.com/atc0005/go-ci/issues/657) indicating that you
wish for it to be maintained & available for use:

- <https://github.com/atc0005/go-ci/issues/657>
- does not include linters

### `go-ci-stable-mirror-build-*`

Expand All @@ -119,6 +110,7 @@ wish for it to be maintained & available for use:
- few (if any) customizations are intended for this image, instead relying on
a project's Makefile or other build tool to setup the environment for tasks
such as testing, linting & building source code
- does not include linters

These images are intended to assist with asserting that projects build with
the latest version in a specific series.
Expand Down
36 changes: 36 additions & 0 deletions stable/build/cgo-mingw-w64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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 golang:1.20.1

# 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-stable-cgo-mingw-w64"
LABEL org.opencontainers.image.description="Docker container image used to build Go code. \
Based on the latest version of the current stable golang image. Supports static, \
cgo-enabled builds via mingw."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

ENV APT_BSDMAINUTILS_VERSION="12.1.7+nmu3"
ENV APT_TREE_VERSION="1.8.0-1+b1"
ENV APT_GCC_MULTILIB_VERSION="4:10.2.1-1"
ENV APT_GCC_MINGW_W64_VERSION="10.2.1-6+24.2"

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bsdmainutils=${APT_BSDMAINUTILS_VERSION} \
tree=${APT_TREE_VERSION} \
gcc-multilib=${APT_GCC_MULTILIB_VERSION} \
gcc-mingw-w64=${APT_GCC_MINGW_W64_VERSION} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
79 changes: 0 additions & 79 deletions stable/build/debian/Dockerfile

This file was deleted.

File renamed without changes.