diff --git a/.gitea/workflows/image.yml b/.gitea/workflows/image.yml index 4614f7c..d34bfdf 100644 --- a/.gitea/workflows/image.yml +++ b/.gitea/workflows/image.yml @@ -86,7 +86,7 @@ jobs: dockerfile: Dockerfile job_image: ubuntu:26.04@sha256:c098726dd9b9733f3e885f8de0ef375206a311b0a317eadc40d347b1115fb944 - name: ci - version: 0.2.6 + version: 0.2.7 subpath: "" dockerfile: images/ci/Dockerfile job_image: ubuntu:26.04@sha256:c098726dd9b9733f3e885f8de0ef375206a311b0a317eadc40d347b1115fb944 diff --git a/images/ci/Dockerfile b/images/ci/Dockerfile index 4269966..31182cb 100644 --- a/images/ci/Dockerfile +++ b/images/ci/Dockerfile @@ -115,7 +115,7 @@ RUN set -eu; \ FROM os AS final LABEL org.opencontainers.image.title="ci" \ - org.opencontainers.image.description="CI tooling image for the mortis.kamino Ansible Collection: the Lint and Build workflows run in it, so a job only checks out the code and runs. It bakes in ansible-core, ansible-lint, pre-commit with every hook environment of the repository, antsibull-changelog, galaxy-importer, reuse, git, shellcheck, Python 3.11 and 3.13 next to the distribution's python3 and primed ansible-test sanity virtualenvs. Use it as a job container pinned by tag and digest; it has no Node, so clone with git." \ + org.opencontainers.image.description="CI tooling image for the mortis.kamino Ansible Collection: the Lint and Build workflows run in it, so a job only checks out the code and runs. It bakes in ansible-core, ansible-lint, pre-commit with every hook environment of the repository, antsibull-changelog, galaxy-importer, reuse, git, shellcheck, Python 3.11 and 3.13 next to the distribution python3 and primed ansible-test sanity virtualenvs. Use it as a job container pinned by tag and digest; it has no Node, so clone with git." \ org.opencontainers.image.source="https://git.rkdr.net/mortis/kamino" \ org.opencontainers.image.url="https://git.rkdr.net/mortis/kamino" \ org.opencontainers.image.documentation="https://git.rkdr.net/mortis/kamino/src/branch/main/docs/images/ci.md" \ diff --git a/scripts/check_image_versions.py b/scripts/check_image_versions.py index 8f1e61d..a2e1749 100644 --- a/scripts/check_image_versions.py +++ b/scripts/check_image_versions.py @@ -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() diff --git a/tests/scripts/test_check_image_versions.py b/tests/scripts/test_check_image_versions.py index 0ad00c5..165b5d7 100644 --- a/tests/scripts/test_check_image_versions.py +++ b/tests/scripts/test_check_image_versions.py @@ -311,6 +311,8 @@ class PureTest(unittest.TestCase): self.assertIn("documentation label must be", check()[0]) files["images/ci/Dockerfile"] = labelled("renamed") self.assertTrue(any("expected the image name" in e for e in check())) + files["images/ci/Dockerfile"] = labelled("ci").replace('net.rkdr.mortis.usage="x"', 'net.rkdr.mortis.usage="the distribution\'s tool"') + self.assertIn("contain a single quote", check()[0]) files["images/ci/Dockerfile"] = labelled("ci").replace('base.name="ubuntu:24.04"', 'base.name="ubuntu:22.04"') self.assertIn("base.name label 'ubuntu:22.04' differs", check()[0]) files["images/ci/Dockerfile"] = labelled("ci")