fix(image): give every image its own job container release

kaniko runs inside the job container and unpacks the image it builds over it, so the
job container must be the same Ubuntu release as the image's FROM lines. A single
ubuntu:26.04 job container broke the molecule-ubuntu2404 build (run 2529: GLIBC_2.42
not found, then the credential cleanup step died too).

Each matrix entry now names job_image, check_image_versions.py pins fails when it
differs from the Dockerfile's release, the bot-diff guard allows tag and digest edits
of job_image lines, Renovate tracks them with a regex manager (never automerged), and
major ubuntu updates are disabled everywhere: a new release is a deliberate edit.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
This commit is contained in:
Defame1297andClaude Sonnet 5.5 committed 2026-10-26 18:58:21 +00:00
1 parent 3c471b8986
commit c3d0d7df65
7 files changed
+142 -28

No files matched your search

+3 -3
View File
@@ -11,7 +11,7 @@ When <head-ref> starts with `renovate/`, the diff of <base-ref>...HEAD may only
* images/<name>/Dockerfile: the tag and digest of FROM lines (the image name stays), and
the `uv==<version>` token of a line that holds one;
* .gitea/workflows/image.yml: the matrix `version:` lines, and the tag and digest of the
job container's `image: ubuntu:...@sha256:...` line (the name stays);
job containers' `job_image: ubuntu:...@sha256:...` lines (the name stays);
* .gitea/workflows/{lint,build,molecule}.yml: the version and digest of a
`git.rkdr.net/mortis/<name>:<version>@sha256:<digest>` pin (the name stays), including
the MOLECULE_IMAGE value.
@@ -51,7 +51,7 @@ VERSION_LINE = re.compile(
r"""^\s*(?:-\s*)?version:\s*["']?(?P<v>[0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?)["']?\s*(?:#.*)?$""")
FROM_LINE = re.compile(rf"^(FROM\s+(?:--\S+\s+)*)([^\s:@]+)(?::{TAG})?@sha256:[0-9a-f]{{64}}(\s+AS\s+\S+)?\s*$")
UV_TOKEN = re.compile(r"\buv==[0-9][0-9A-Za-z.+!_-]*")
UBUNTU_LINE = re.compile(rf"^(\s*image:\s*ubuntu)(?::{TAG})?@sha256:[0-9a-f]{{64}}\s*$")
UBUNTU_LINE = re.compile(rf"^(\s*job_image:\s*ubuntu)(?::{TAG})?@sha256:[0-9a-f]{{64}}\s*$")
DOCKERFILE = re.compile(r"images/[^/]+/Dockerfile")
CONSUMERS = {".gitea/workflows/lint.yml", ".gitea/workflows/build.yml", ".gitea/workflows/molecule.yml"}
@@ -117,7 +117,7 @@ def file_problem(path, removed, added):
if DOCKERFILE.fullmatch(path):
return same_shape(removed, added, reduce_dockerfile, "the tag or digest of a FROM line or a `uv==` pin")
if path == civ.MATRIX_FILE:
return same_shape(removed, added, reduce_image_yml, "a matrix `version:` or the ubuntu job container pin")
return same_shape(removed, added, reduce_image_yml, "a matrix `version:` or a `job_image:` ubuntu pin")
if path in CONSUMERS:
return same_shape(removed, added, reduce_pin, "an image pin of the mortis registry")
return "is not a file a bot pull request may change"