Rewrite stale gate wording and trim private references so the repository can be made public. - molecule.yml header: the runner sits in an isolated network segment, not behind the Proxmox firewall; state that a fork PR's workflow started without approval in a live test (unproven for outsiders) and that the `if:` guard is a convenience, not a boundary. Fork PRs are not claimed disabled; the repository should not accept them from untrusted users. - CONTRIBUTING.md: same fork PR statement. - SECURITY.md: new, with a TODO(operator) for the reporting contact. - CLAUDE.md trimmed. Removed: the private environment-repo links and issue numbers, the two-sentence extraction history, run numbers, the registry push secret names and the Renovate token name and scopes, the Renovate dry-run and first-live-run narrative, the runner hostname and the cron time. Kept: git -C and commit-with-git rules, runner labels, image and Renovate rules. - ADR 0004 references in workflows and scripts now say it lives in the maintainer's environment repository; docs/images/ci.md drops "private". Comment and doc text only; image pins, the bot e-mail and runner labels are unchanged. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
4.7 KiB
ci
The CI tooling image of the mortis.kamino Collection: everything the Lint and Build
workflows used to install on each run is baked in, so a job only checks out the code and runs.
What is in it
Ubuntu 26.04 with:
- Python tools in
/opt/venv(onPATH), fromrequirements-dev.txt:ansible-core,ansible-lint,pre-commit,antsibull-changelog,galaxy-importer,reuse. - Every pre-commit hook environment of
.pre-commit-config.yamlin/opt/pre-commit(PRE_COMMIT_HOME): conventional-pre-commit, gitleaks, yamllint, pre-commit-hooks and actionlint. The Go hooks are prebuilt; their toolchains are removed to keep layers small. The local hooks (reuse-lint,antsibull-changelog-lint,ansible-lint) arelanguage: system: they run from/opt/venv, which is why that directory must be onPATH(it is, in the image). ansible-test sanityvirtualenvs, primed in/root/.ansible/test, and Python 3.11 and 3.13 aspython3.11/python3.13(python-build-standalone, installed with uv) next to the distribution'spython3, so sanity runs its compile test for those interpreters instead of skipping it.git,shellcheck(actionlint runs it overrun:blocks),python3,python3-venvandca-certificates. The image runs as root and sets no working directory./opt/ci-pins.sha256: the checksums of the two pin files this image was built from.
It has no Node, so JavaScript actions (actions/checkout) cannot run in it: clone with git.
How to use it
As the job container of a workflow on the kamino-docker runner, pinned by tag and digest. This is the
shape of .gitea/workflows/lint.yml (which also holds the checkout step with the job-token authentication the
repository needs; read it for the full version):
jobs:
lint:
runs-on: kamino-docker
container:
image: git.rkdr.net/mortis/ci:<version>@sha256:<digest>
env:
PRE_COMMIT_HOME: /opt/pre-commit
steps:
# ... clone the repository and check out the commit (the image has no Node, so no actions/checkout)
- name: Check the baked tooling against the pins # run from the checkout root
run: |
if ! sha256sum --quiet -c /opt/ci-pins.sha256; then
/opt/venv/bin/pip install --quiet -r requirements-dev.txt # a pin changed: install the pinned tools
fi
- name: Run pre-commit on all files
run: |
export PATH="/opt/venv/bin:$PATH"
pre-commit run --all-files --show-diff-on-failure
/opt/ci-pins.sha256 lists the two pin files by relative name, so sha256sum -c runs in the checkout root. When
the checkout's requirements-dev.txt and .pre-commit-config.yaml match, the baked tools are used as they are.
When a pull request changes a pin the check fails and the job installs the pinned tools itself for that run
(slower, same result), until the image is rebuilt from main. lint.yml and build.yml are the real consumers.
Tags and pinning
<version>is semver, independent of the Collection's version. A published version is never moved or rebuilt, so one digest belongs to exactly one version.latestis the newest version, for looking only.- Pin
ci:<version>@sha256:<digest>; the digest is what is enforced. Consumers:lint.ymlandbuild.yml. - Renovate is configured to move the pins to a new version after the image is built on
main(the rule is inrenovate.json; the first pin of a brand-new image is made by hand).
How it is built and kept up to date
.gitea/workflows/image.yml builds it with kaniko (repository root as build context, because the pin
files are copied in). The workflow runs on pushes to main that touch images/**, requirements-dev.txt,
.pre-commit-config.yaml or the workflow itself, never on a pull request, and builds an image only when its
version: in the workflow's matrix is not yet published. A change to the image's inputs therefore needs a new
version: (Lint enforces it, and Renovate's bump step does it for dependency updates), and the merge builds
the image. Each pushed layer stays below 100 MB (Cloudflare's request limit), which is why the Go toolchains
are deleted from the hook cache.
Image metadata
The org.opencontainers.image.* labels (title, description, version, revision, created, source,
documentation, licenses, authors) and net.rkdr.mortis.* labels (what it is for, what it contains,
how to use it; the base image is base.name) are listed on the package page of the registry; version,
revision and created are set by the build.
Source: https://git.rkdr.net/mortis/kamino, images/ci/Dockerfile. Licence: GPL-3.0-or-later.