docs: describe Molecule running in the molecule-controller image

The ci image's labels and doc, the consumer lists, the Molecule rules in
.gitea/workflows/AGENTS.md and the accepted risk on pin bumps in SECURITY.md said Molecule
runs in the ci image. They now name the molecule-controller image, its pin files and which
pin files select scenarios.

Closes #431

Assisted-by: Claude Code
This commit is contained in:
Defame1297 committed 2026-11-29 19:25:33 +00:00
1 parent 89bd579e87
commit 4db1a2b3c9
8 files changed
+44 -38

No files matched your search

+7 -10
View File
@@ -1,7 +1,9 @@
# ci
The **CI tooling image** of the [`mortis.kamino`](https://git.rkdr.net/mortis/kamino) Collection: everything the Lint, Build and
Molecule workflows used to install on each run is baked in, so a job only checks out the code and runs.
The **CI tooling image** of the [`mortis.kamino`](https://git.rkdr.net/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. The Molecule workflow
runs in the [`molecule-controller`](molecule-controller.md) image instead
([ADR 0003](../adr/0003-molecule-controller-image.md)), so a tool bump only Lint uses selects no Molecule scenario.
## What is in it
@@ -59,25 +61,20 @@ jobs:
pre-commit run --all-files --show-diff-on-failure
```
The Molecule job runs on the `kamino-molecule` runner, a host executor, so it starts the image itself with
`docker run`, as the runner user, with the Docker socket and the checkout mounted at the same path (molecule
hands the daemon paths in the checkout); `scripts/run_molecule_in_ci_image.sh` does the same pin check inside it.
Read `.gitea/workflows/molecule.yml` for the full command.
`/opt/ci-pins.sha256` lists the five pin files by their checkout-relative path, so `sha256sum -c` runs in the checkout root. When
the checkout's `requirements-dev.txt`, `requirements-dev.lock`, `requirements.yml`, `extensions/molecule/requirements.yml` and `.pre-commit-config.yaml` match, the baked tools and
collections are used as they are, and Lint and Build cut the network by environment (proxy variables and
`PIP_NO_INDEX`) for all but the script tests, so a tool that downloads at run time fails the job. When a pull request changes a pin the check fails and the job installs the pinned
tools and collections itself for that run
(slower, same result), until the image is rebuilt from `main`. `lint.yml`, `build.yml`, `molecule.yml` and `gitea-release-key.yml`
(slower, same result), until the image is rebuilt from `main`. `lint.yml`, `build.yml` and `gitea-release-key.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. `latest` is the newest version, for looking only.
- Pin `ci:<version>@sha256:<digest>`; the digest decides what is pulled. Consumers: `lint.yml`, `build.yml`,
`molecule.yml` and `gitea-release-key.yml`.
- Pin `ci:<version>@sha256:<digest>`; the digest decides what is pulled. Consumers: `lint.yml`, `build.yml` and
`gitea-release-key.yml`.
- Renovate is configured to move the pins to a new version after the image is built on `main` (the rule is in
`renovate.json`; the first pin of a brand-new image is made by hand).