From 56c5c6dd72c4f7fb81f94b24c1f78c4dc65b4d34 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Sun, 29 Nov 2026 17:34:17 +0000 Subject: [PATCH] ci(images): fail the controller self-check on an empty locked version 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 --- images/molecule-controller/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/images/molecule-controller/Dockerfile b/images/molecule-controller/Dockerfile index b6f03e6..5f50c49 100644 --- a/images/molecule-controller/Dockerfile +++ b/images/molecule-controller/Dockerfile @@ -115,8 +115,10 @@ RUN set -eu; \ sha256sum --quiet -c /opt/molecule-pins.sha256; \ python -c "import sys; assert '%d.%d' % sys.version_info[:2] == '${PYTHON_VERSION}', sys.version"; \ core="$(sed -n 's/^ansible-core==\([^ ]*\).*/\1/p' requirements-molecule.lock)"; \ + test -n "$core"; \ ansible --version | head -n1 | grep -F "core ${core}]"; \ mol="$(sed -n 's/^molecule==\([^ ]*\).*/\1/p' requirements-molecule.lock)"; \ + test -n "$mol"; \ molecule --version | grep -F "molecule ${mol}"; \ molecule drivers | grep -qw docker; \ python -c "import docker"; \