ci(images): preinstall gnupg in molecule-ubuntu2404 #119

Merged
Defame1297 merged 1 commits from ci/molecule-image-gnupg into main 2026-11-14 12:45:06 +00:00
Owner

What

Adds gnupg to the molecule-ubuntu2404 image (version 0.1.5 to 0.1.6, by scripts/bump_image_versions.py), with the contents label and docs/images/molecule-ubuntu2404.md updated.

The docker scenario installs gnupg in prepare.yml to sign its stand-in APT repository, which costs an apt update and an install in every run (about 10 s of its 12 s prepare). system_baseline installs it among its essential packages.

This is PR 1 of the repo's two-PR loop for an image input: image change and version bump only. Merging builds 0.1.6 on main and prints its digest. The follow-up pull request then:

  • moves the three consumer pins in molecule.yml to 0.1.6 and that digest;
  • removes the gnupg task from roles/docker/molecule/default/prepare.yml (this is where the saving arrives; it cannot land before the pin moves, because the pinned image does not have gnupg yet);
  • adds gnupg to the image-smoke contract (extensions/molecule/image-smoke/verify.yml) and updates the docker README line that says the scenario needs the Ubuntu mirrors for gnupg.

Only molecule-ubuntu2404 changes. molecule-ubuntu2604 is used only by image-smoke-2604, which does not need gnupg.

Tradeoff

system_baseline lists gnupg in its essential packages, so its scenario no longer exercises the install of that one package; its other packages are still installed during converge. It also saves that scenario a few seconds. The saving overall is small (about 10 to 15 s per full run, most of it in docker), which is why only gnupg is baked in: telnet and locales in the system_baseline prepare would not help, since telnet still needs apt update, and baking telnet in would blur what the image stands for.

Verified

  • scripts/check_image_versions.py pins and bump origin/main pass; bump_image_versions.py made the version edit.
  • Script tests (152) and the commit hooks (Conventional Commits, gitleaks, yamllint, actionlint, REUSE, changelog lint, ansible-lint) pass. There is no Dockerfile linter in this repo's hooks, so the Dockerfile change is checked only by reading it and by the label check in check_image_versions.py pins.
  • ansible-test sanity is not affected: nothing under scripts/ or tests/ changed.

Not verified

  • The image is not built or run locally (there is no container runtime on the control host). The first build is the one on main after the merge: check that image.yml publishes 0.1.6 and that the layer stays below the 100 MB limit (it was about 30 MB; gnupg adds a few MB, not measured).
  • Molecule on this pull request runs against the old pinned image, as for every image input; it tests nothing new.

🤖 Generated with Claude Code

## What Adds `gnupg` to the `molecule-ubuntu2404` image (version 0.1.5 to 0.1.6, by `scripts/bump_image_versions.py`), with the `contents` label and `docs/images/molecule-ubuntu2404.md` updated. The `docker` scenario installs `gnupg` in `prepare.yml` to sign its stand-in APT repository, which costs an `apt update` and an install in every run (about 10 s of its 12 s prepare). `system_baseline` installs it among its essential packages. This is **PR 1 of the repo's two-PR loop for an image input**: image change and version bump only. Merging builds 0.1.6 on `main` and prints its digest. The follow-up pull request then: - moves the three consumer pins in `molecule.yml` to 0.1.6 and that digest; - removes the `gnupg` task from `roles/docker/molecule/default/prepare.yml` (this is where the saving arrives; it cannot land before the pin moves, because the pinned image does not have `gnupg` yet); - adds `gnupg` to the image-smoke contract (`extensions/molecule/image-smoke/verify.yml`) and updates the `docker` README line that says the scenario needs the Ubuntu mirrors for `gnupg`. Only `molecule-ubuntu2404` changes. `molecule-ubuntu2604` is used only by `image-smoke-2604`, which does not need `gnupg`. ## Tradeoff `system_baseline` lists `gnupg` in its essential packages, so its scenario no longer exercises the install of that one package; its other packages are still installed during converge. It also saves that scenario a few seconds. The saving overall is small (about 10 to 15 s per full run, most of it in `docker`), which is why only `gnupg` is baked in: `telnet` and `locales` in the `system_baseline` prepare would not help, since `telnet` still needs `apt update`, and baking `telnet` in would blur what the image stands for. ## Verified - `scripts/check_image_versions.py pins` and `bump origin/main` pass; `bump_image_versions.py` made the version edit. - Script tests (152) and the commit hooks (Conventional Commits, gitleaks, yamllint, actionlint, REUSE, changelog lint, ansible-lint) pass. There is no Dockerfile linter in this repo's hooks, so the Dockerfile change is checked only by reading it and by the label check in `check_image_versions.py pins`. - `ansible-test sanity` is not affected: nothing under `scripts/` or `tests/` changed. ## Not verified - The image is not built or run locally (there is no container runtime on the control host). The first build is the one on `main` after the merge: check that `image.yml` publishes 0.1.6 and that the layer stays below the 100 MB limit (it was about 30 MB; `gnupg` adds a few MB, not measured). - Molecule on this pull request runs against the old pinned image, as for every image input; it tests nothing new. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Claude added 1 commit 2026-11-14 12:44:08 +00:00
ci(images): preinstall gnupg in molecule-ubuntu2404
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 21s
Molecule / molecule (pull_request) Successful in 1s
0a3ff387d7
The docker scenario installs gnupg in prepare to sign its stand-in APT
repository, which costs an apt update and an install in every run (about 10 s of
its 12 s prepare); system_baseline installs it among its essential packages. It
is now part of the image, version 0.1.6.

Image input only: the consumers' pins, the docker prepare task and the
image-smoke contract move in the pin follow-up pull request, once the build on
main has printed the new digest.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
Defame1297 merged commit f7f5b7adf9 into main 2026-11-14 12:45:06 +00:00
Defame1297 deleted branch ci/molecule-image-gnupg 2026-11-14 12:45:06 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#119