ci(images): build and publish the molecule-controller image #484

Open
Claude wants to merge 6 commits from ci/477-molecule-controller-image into main
pull from: ci/477-molecule-controller-image
6 Commits
Author SHA1 Message Date
Defame1297 1289da3104 Merge branch 'main' into ci/477-molecule-controller-image
Build / build (pull_request) Successful in 29s
Molecule / molecule (pull_request) In progress
Lint / lint (pull_request) Successful in 3m21s
2026-11-29 18:19:41 +00:00
Defame1297 56c5c6dd72 ci(images): fail the controller self-check on an empty locked version
Build / build (pull_request) Successful in 33s
Lint / lint (pull_request) Successful in 3m25s
Molecule / molecule (pull_request) Canceled after 7m3s
The self-check reads the ansible-core and molecule versions from the
lock with sed; an empty result made the grep match any version. It now
fails the build instead.

Refs #477

Assisted-by: Claude Code
2026-11-29 17:34:17 +00:00
Defame1297 c3a7cef195 fix(scripts): give a repository not pushed yet no tags
The registry answers tags/list for a repository that does not exist yet
with 404 NAME_UNKNOWN (OCI distribution spec), which failed the Images
version step for the first build of a new image such as
molecule-controller. A 404 on the first tags/list page now reads as no
tags, so the image gets <base>.0; a 404 on a manifest stays an error.

Refs #477

Assisted-by: Claude Code
2026-11-29 17:34:01 +00:00
Defame1297 0fb4fd70ee ci(renovate): bump the molecule-controller pins like the ci ones
Renovate's pip-compile manager now reads requirements-molecule.lock, and
its uv manager reads the controller Dockerfile's uv pin. The bot-PR
guard holds the controller requirements and lock to the same rules as
requirements-dev.txt and its lock, so the bot's pull requests for them
are neither refused nor freer than the ci ones. The ansible tooling
group spans both locks, so one pull request moves both ansible-core
pins, which check_image_versions.py holds equal.

Checked with renovate 44.161.0 --platform=local: it extracts
requirements-molecule.txt with requirements-molecule.lock, and the uv
pin of images/molecule-controller/Dockerfile.

Refs #477

Assisted-by: Claude Code
2026-11-29 17:09:29 +00:00
Defame1297 fd448d7e9e 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
2026-11-29 17:03:35 +00:00
Defame1297 26c6026d1a ci(scripts): lock either root requirements file
The molecule-controller image gets a requirements file and lock of its
own (ADR 0003), so the lock script takes the file to lock:
requirements-dev.txt by default, as before, or requirements-molecule.txt.
Any other argument is a usage error, so a typo cannot write a lock
somewhere else.

The new test runs the script against a stub interpreter, so it needs
no network.

Refs #477

Assisted-by: Claude Code
2026-11-29 17:03:05 +00:00