63cf28c90e
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
23 lines
850 B
Docker
23 lines
850 B
Docker
ARG BASE_IMAGE=artifactapi.k8s.syd1.au.unkin.net/dockerhub/library/almalinux:9
|
|
|
|
FROM ${BASE_IMAGE} AS image
|
|
ARG DISTRO=alma9
|
|
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; \
|
|
rm -f /etc/yum.repos.d/*.repo; \
|
|
curl -fsSL -o /tmp/ca.rpm "$CA_RPM_URL"; \
|
|
echo "$CA_RPM_SHA256 /tmp/ca.rpm" | sha256sum -c -; \
|
|
rpm -i /tmp/ca.rpm; \
|
|
cp /tmp/distro/yum.repos.d/*.repo /etc/yum.repos.d/; \
|
|
dnf makecache; \
|
|
dnf update -y; \
|
|
dnf install -y $PACKAGES; \
|
|
dnf clean all; \
|
|
rm -rf /var/cache/dnf /tmp/ca.rpm /tmp/distro
|
|
CMD ["/bin/bash"]
|