06b159694c
The hand-rolled pre-commit.sh reimplemented what upstream hooks already do. Move to pre-commit.com with the estate's usual pre-commit-hooks set plus hadolint and shellcheck, and keep the one check with no upstream equivalent (distros/ vs the Woodpecker matrices) as a repo: local hook. The test harness goes; tests will be reintroduced differently. - add .pre-commit-config.yaml and ci/check-distros.sh - delete pre-commit.sh, test.sh and .woodpecker/test.yaml - run uvx pre-commit run --all-files from .woodpecker/pre-commit.yaml and make pre-commit - drop the Dockerfile test stage and the make test targets
25 lines
1.1 KiB
Docker
25 lines
1.1 KiB
Docker
ARG REGISTRY=artifactapi.k8s.syd1.au.unkin.net/docker-internal
|
|
# The container-base release this image is built on — the one place to bump it.
|
|
ARG BASE_VERSION=0.1.0
|
|
ARG BASE_IMAGE_NAME=almalinux9
|
|
|
|
FROM ${REGISTRY}/${BASE_IMAGE_NAME}:${BASE_VERSION} AS image
|
|
ARG DISTRO=alma9
|
|
ARG GO_CACHE_PLUGIN_VERSION=v0.1.0
|
|
ARG GO_CACHE_PLUGIN_SHA256=0eb23d06a0dcf395559cb6447864579c220e60148fdcd6a6f841c2b17169b9b8
|
|
COPY distros/${DISTRO}/ /tmp/distro/
|
|
# DL3041: versions are pinned by the estate dnf repos, not here. SC2086: $PACKAGES is a
|
|
# word list on purpose. DL4006: the only pipe ends in sha256sum, whose status is the
|
|
# pipeline's, and set -e catches it.
|
|
# hadolint ignore=DL3041,DL4006,SC2086
|
|
RUN set -eux; \
|
|
. /tmp/distro/distro.env; \
|
|
dnf install -y $PACKAGES; \
|
|
dnf clean all; \
|
|
curl -fsSL -o /usr/local/bin/go-cache-plugin \
|
|
"https://git.unkin.net/unkin/go-cache-plugin/releases/download/${GO_CACHE_PLUGIN_VERSION}/go-cache-plugin-linux-amd64"; \
|
|
echo "$GO_CACHE_PLUGIN_SHA256 /usr/local/bin/go-cache-plugin" | sha256sum -c -; \
|
|
chmod 0755 /usr/local/bin/go-cache-plugin; \
|
|
rm -rf /var/cache/dnf /tmp/distro
|
|
CMD ["/bin/bash"]
|