fix(image): no single quote in a label (kaniko rejects it) and a check for it
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 13s

Run 2556: the ci image failed at its LABEL step (unexpected end of statement while looking for
matching single-quote) on the apostrophe in 'the distribution's python3'. Docker accepts it,
kaniko's own LABEL parser does not, and the molecule images built only because their labels
have none. The label text is reworded and check_image_versions.py pins now fails on a single
quote in any label. ci 0.2.6 was never pushed; the gate wants a higher version than main's,
so the fix is 0.2.7.

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 19:44:12 +00:00
1 parent c5c98bb543
commit 6c85d61827
4 files changed
+8 -2

No files matched your search

+4
View File
@@ -441,6 +441,10 @@ def check_image_metadata(matrix, read_file, size_of):
missing = [key for key in REQUIRED_LABELS if not labels.get(key, "").strip()]
if missing:
errors.append(f"image '{name}': the last stage of {path} lacks the label(s) {', '.join(missing)}")
quoted = sorted(key for key, value in labels.items() if "'" in value)
if quoted:
errors.append(f"image '{name}': the label(s) {', '.join(quoted)} contain a single quote, which kaniko's "
"LABEL parser rejects (run 2556); reword the text")
doc = f"docs/images/{name}.md"
source = labels.get("org.opencontainers.image.source", "").strip()
link = labels.get("org.opencontainers.image.documentation", "").strip()