Each file holds its directory's rules in full: the rule, a one-sentence reason and how it is held (control, review or aspirational). The interim dependency and image section of making-a-change.md moves into scripts/AGENTS.md and images/AGENTS.md; the contributor docs point to the new files. Closes #182 Assisted-by: Claude Code:claude-opus-5-5
5.8 KiB
5.8 KiB
Image rules
Every rule for the CI and test images in images/ (ci, molecule-ubuntu2404,
molecule-ubuntu2604), their build in .gitea/workflows/image.yml, and the image-smoke
scenarios in extensions/molecule/, in full. Each gives its reason (Why) and how it is held
(Held): a control names its hook or check; review means a person other than the author sees the
change before it merges (images/ and .gitea/ are under CODEOWNERS); aspirational means
nothing checks it. "Until X (#N) lands" names a change that is planned and its backlog issue.
image.yml builds each image with kaniko on push to main, never on a pull request, and pushes
it to this repository's organisation in the Gitea registry as <version> and latest.
Versions and pins
- A published version is never moved and never rebuilt. The build looks the version up in
the registry first and ends without building when it exists; there is no
sha-*tag, so one digest belongs to exactly one version. Why: a pin names exactly what a reviewer saw. Held: control: the tag lookup inimage.yml's "Prepare kaniko and check the registry credential" step. - A pull request that changes an image input (
requirements-dev.txt,requirements-dev.lock,requirements.yml,.pre-commit-config.yaml,images/**) raises that image'sversion:(a PATCH bump) in theimage.ymlbuild matrix (python3 scripts/bump_image_versions.pymakes the edit). Until #165 assigns versions in CI. Why: a published version is never rebuilt, so a changed input needs a new version. Held: control: the Lint check's "Check image versions were bumped" step. - After the merge builds the image, a second pull request moves the
image:<version>@sha256:<digest>pins inlint.yml,build.yml,molecule.ymlandgitea-release-key.ymlto the digest the build printed. It touches noimage.ymltrigger path, so it rebuilds nothing. Renovate opens it for these images; a new image's first pin is a hand-made pull request, and a major version is moved by hand. Why: consumers run exactly the digest a reviewer saw. Held: review. - Image-input bumps are no Collection release: these files are in
galaxy.ymlbuild_ignore, and their bumps need no changelog fragment and no newgalaxy.ymlversion. Why: they change neither the Collection nor what a consumer installs. Held: control for "not shipped":scripts/check_tarball.pyin the Build check allows only Collection files in the archive; review for the version.
Releases and the build container
- Each molecule image is one Ubuntu release, named after it; a new release is a new image,
added by hand (Renovate's major
ubuntuupdates are disabled). Roles are tested on every release a target host runs. Why: a role is only proven on the release it runs on. Held: review. - Retire an image when no host runs its release. Why: testing on a release nobody runs costs runner time and proves nothing. Held: aspirational.
- Each matrix entry's
job_image: ubuntu:<release>@sha256:...has the same release as theFROM ubuntu:of its Dockerfile. Moving an image to a new release is one edit: theFROM, thejob_imagetag and digest, and the version bump. Digest drift within a release is tolerated. Ajob_image-only bump is not an image input: no version bump, nothing rebuilt; the post-merge Images run builds nothing past its prepare step for a published version, so that is its only exercise. Why: kaniko runs inside the job container and unpacks the image it builds over it. Held: control:check_image_versions.py pinsin the Lint check. - kaniko (the osscontainertools fork) is pinned by layer digests in
image.ymland bumped by hand when that fork publishes a release. Why: Renovate cannot compute the layer digests. Held: aspirational.
Contents and size
- Bake in: every tool, collection, hook environment and package a CI job uses is in its image; a job downloads at run time only on the slow path (a pull request that changes a pin file). Why: a run that downloads is slower and depends on the network. Held: review until the network-off check (#168) lands.
- Recorded speed: a speed optimisation that adds machinery states its measured saving where it lives (a comment next to it). Why: machinery is kept only for a saving someone can check. Held: review.
- Every pushed layer stays below 100 MB; when you change an image, estimate each layer's
compressed size and state the estimate in the pull request. The
cibuild prints the compressed size of each layer directory, and the registry stores about 9% more. Why: Cloudflare rejects larger request bodies with HTTP 413. Held: aspirational; the push failing onmainis the backstop, because there is no pull-request build, by the maintainer's choice.
Metadata
- Each Dockerfile carries the same label block (
org.opencontainers.image.*plusnet.rkdr.mortis.purpose,contentsandusage); the build addsversion,revisionandcreated. The readme-style text lives indocs/images/<name>.md, which thedocumentationlabel links to. Why: Gitea's package page shows the labels and links but renders no README. Editing that doc is not an image input and needs no new version; editing a label is and does. Held: control:check_image_versions.py pinsfails when a label or the doc is missing.
Image-smoke scenarios
extensions/molecule/image-smokeandimage-smoke-2604test the molecule images themselves (24.04 and 26.04), including that each runs the release its name says. Their image comes fromMOLECULE_IMAGEorMOLECULE_IMAGE_2604inmolecule.yml, so a pin pull request runs them. Why: an image is proven by its own pin pull request before a role depends on it. Held: control: the scenarios, in the Molecule check.