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

Remove go-ci-lint-only image #867

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
31 changes: 0 additions & 31 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,37 +171,6 @@ jobs:
- name: Build stable mirror image
run: make stable-mirror-build

build_stable_linting_only_image_using_makefile:
name: Build stable linting-only image using Makefile
runs-on: ubuntu-latest
# Default: 360 minutes
timeout-minutes: 10

steps:
- name: Print Docker version
run: docker --version

- name: Check out code into the Go module directory
uses: actions/checkout@v3

# Mark the current working directory as a safe directory in git to
# resolve "dubious ownership" complaints.
#
# https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
# https://confluence.atlassian.com/bbkb/git-command-returns-fatal-error-about-the-repository-being-owned-by-someone-else-1167744132.html
# https://github.com/actions/runner-images/issues/6775
# https://github.com/actions/checkout/issues/766
- name: Mark the current working directory as a safe directory in git
# run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
run: git config --global --add safe.directory "${PWD}"

# bsdmainutils provides "column" which is used by the Makefile
- name: Install Ubuntu packages
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends make gcc bsdmainutils

- name: Build stable linting-only image
run: make stable-linting-only

build_oldstable_image_using_makefile:
name: Build oldstable image using Makefile
runs-on: ubuntu-latest
Expand Down
34 changes: 7 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ DOCKER_IMAGE_NAME_MIRROR_BUILD_GO120 = go-ci-stable-mirror-build-go1.20
DOCKER_IMAGE_NAME_ALPINE_BUILDX86 = go-ci-stable-alpine-buildx86
DOCKER_IMAGE_NAME_ALPINE_BUILDX64 = go-ci-stable-alpine-buildx64
DOCKER_IMAGE_NAME_STABLE = go-ci-stable
DOCKER_IMAGE_NAME_STABLE_LINT_ONLY = go-ci-lint-only
DOCKER_IMAGE_NAME_OLDSTABLE = go-ci-oldstable
DOCKER_IMAGE_NAME_UNSTABLE = go-ci-unstable
DOCKER_IMAGE_OWNER_LABEL = $(DOCKER_IMAGE_REGISTRY_USER).$(DOCKER_IMAGE_REPO)
Expand All @@ -63,7 +62,6 @@ DOCKER_FILES = oldstable/Dockerfile \
stable/build/alpine-x86/Dockerfile \
stable/build/debian/Dockerfile \
stable/combined/Dockerfile \
stable/linting/Dockerfile \
unstable/Dockerfile \


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

.PHONY: linting
## linting: lint all Dockerfiles
Expand Down Expand Up @@ -277,24 +275,6 @@ stable-mirror-build: pre-build

@echo "Completed build of stable-mirror-build images"

.PHONY: stable-linting-only
## stable-linting-only: Build stable linting-only image
stable-linting-only: pre-build

@echo "Building stable linting-only release"
sudo docker image build \
--pull \
--no-cache \
stable/linting/ \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_STABLE_LINT_ONLY) \
-t $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_STABLE_LINT_ONLY)-$(REPO_VERSION) \
-t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_STABLE_LINT_ONLY) \
-t $(GITHUB_IMAGE_REGISTRY)/$(GITHUB_IMAGE_REGISTRY_USER)/$(GITHUB_PROJECT_REPO):$(DOCKER_IMAGE_NAME_STABLE_LINT_ONLY)-$(REPO_VERSION) \
--label=$(DOCKER_IMAGE_OWNER_LABEL) \
--label=$(DOCKER_IMAGE_REVISION_LABEL) \
--label=$(DOCKER_IMAGE_CREATED_LABEL)
@echo "Completed build of stable-linting-only release"

.PHONY: build-oldstable
## build-oldstable: Build oldstable image
build-oldstable: pre-build
Expand Down Expand Up @@ -338,28 +318,28 @@ pre-build:
@echo "Building Docker container images"

@echo "Bundle linter config files to provide baseline default settings"
@for version in {oldstable,unstable,stable/linting,stable/combined,stable/build/debian}; do cp -vf .markdownlint.yml $$version/; done
@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/linting,stable/combined,stable/build/debian}; do cp -vf stable/.golangci.yml $$version/; done
@for version in {stable/combined,stable/build/debian}; do cp -vf stable/.golangci.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 stable-linting-only build-oldstable build-unstable
build: pre-build build-stable build-stable-alpine-buildx64 build-stable-alpine-buildx86 stable-debian-build stable-mirror-build build-oldstable build-unstable

@echo "Remove temporary copies of bundled files"
@rm -vf {oldstable,unstable,stable/linting,stable/combined,stable/build/debian}/.markdownlint.yml
@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/linting,stable/combined,stable/build/debian}/.golangci.yml
@rm -vf {stable/combined,stable/build/debian}/.golangci.yml

@echo "Finished building Docker container images"

Expand Down
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Tooling for linting, testing and building Go applications
- [`go-ci-stable-mirror-build-*`](#go-ci-stable-mirror-build-)
- [`go-ci-oldstable`](#go-ci-oldstable)
- [`go-ci-unstable`](#go-ci-unstable)
- [`go-ci-lint-only`](#go-ci-lint-only)
- [Examples / How to use these images](#examples--how-to-use-these-images)
- [Changelog](#changelog)
- [Requirements](#requirements)
Expand Down Expand Up @@ -150,17 +149,6 @@ the latest version in a specific series.
this image unless it is suspected that the new linters are highly
experimental/unstable

### `go-ci-lint-only`

- smaller image
- uses `golangci/golangci-lint:vX.Y.Z-alpine` image as base
- created as part of a multi-stage container image build
- intended for lightweight testing of iterative branch changes
- e.g., testing or squash/rebase branch work prior to a full suite of checks
usually associated with Pull Requests
- limited linters
- [Primary linters only](#linting-tools-included)

## Examples / How to use these images

For real-world examples of how these images are used, please see the workflows for these projects:
Expand Down
73 changes: 0 additions & 73 deletions stable/linting/Dockerfile

This file was deleted.