ci(images): add the molecule-controller image
ADR 0003 moves Molecule out of the ci image, so a ci bump for a tool only Lint uses stops selecting every scenario. This builds and publishes the image; nothing pins it yet (#431). It bakes requirements-molecule.lock (ansible-core, molecule, molecule-plugins[docker]) on the Python of .python-version and the collections of both requirements.yml files, and records their checksums in /opt/molecule-pins.sha256. Its last RUN checks the tool versions against the lock, the Docker driver, every pinned collection and the pin record, so a broken image fails its build. It has no image-smoke scenario: it is the controller of every scenario, and the full run of its pin pull request proves it; images/AGENTS.md records the exception. check_image_versions.py pins now checks the Python header of both locks and fails when their ansible-core pins differ, so Lint and Molecule judge the code with one ansible-core. The new requirements files stay off the selector's IGNORED list, so a bump there runs every scenario. Refs #477 Assisted-by: Claude Code
This commit is contained in:
1 parent
26c6026d1a
commit
fd448d7e9e
9 files changed
+1199
-28
No files matched your search
+8
-3
@@ -1,7 +1,7 @@
|
||||
# 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
|
||||
Every rule for the CI and test images in `images/` (`ci`, `molecule-controller`,
|
||||
`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
|
||||
@@ -40,7 +40,7 @@ it to this repository's organisation in the Gitea registry as `<version>` and `l
|
||||
|
||||
## Releases and the build container
|
||||
|
||||
- **Each molecule image is one Ubuntu release, named after it; a new release is a new image,
|
||||
- **Each molecule target image (`molecule-ubuntu*`) is one Ubuntu release, named after it; a new release is a new image,
|
||||
added by hand** (Renovate's major `ubuntu` updates 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.
|
||||
@@ -90,3 +90,8 @@ it to this repository's organisation in the Gitea registry as `<version>` and `l
|
||||
`MOLECULE_IMAGE` or `MOLECULE_IMAGE_2604` in `molecule.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.
|
||||
- **`molecule-controller` has no image-smoke scenario: the last `RUN` of its Dockerfile checks
|
||||
its tool versions, Docker driver, collections and pin checksums, and the full Molecule run of
|
||||
its pin pull request proves the rest.** *Why:* it is the controller of every scenario, not a
|
||||
target of one, so a full run tests it more than a scenario of its own could. *Held:* control: the self-checks fail the
|
||||
build on `main`; review for the full run on the pin pull request.
|
||||
Reference in new issue
Block a user