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
This commit is contained in:
1 parent
c3a7cef195
commit
56c5c6dd72
1 file changed
+2
@@ -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"; \
|
||||
|
||||
Reference in new issue
Block a user