ci(molecule): select no scenario for a galaxy.yml change, guarded by a load check
Build / build (pull_request) Successful in 15s
Lint / lint (pull_request) Successful in 1m7s
Molecule / molecule (pull_request) Successful in 15m19s

Scenarios load mortis.kamino from the checkout, not the copy molecule installs from
galaxy.yml, so galaxy.yml goes on the selector's IGNORED list. A new check, run by
run_molecule_in_ci_image.sh before the scenarios, fails the run when the environment
molecule gives ansible-playbook would resolve the collection anywhere else.

Closes #355

Assisted-by: Claude Code
This commit is contained in:
Defame1297 committed 2026-11-24 15:56:27 +00:00
1 parent fcd331be06
commit 03b21a9aef
7 files changed
+274 -5

No files matched your search

+3 -1
View File
@@ -4,7 +4,8 @@
#
# The Molecule workflow's run inside the ci image, from the checkout root: when a pin file differs
# from the image's, install the pull request's pins into $AC_ROOT/pins (/opt is not writable for the
# runner user) and put them first, then run the scenarios on stdin. CI_BASE_PYTHON is a test seam.
# runner user) and put them first, then check that the scenarios on stdin load this checkout and run
# them. CI_BASE_PYTHON is a test seam.
#
# AC_ROOT=<dir holding ansible_collections> scripts/run_molecule_in_ci_image.sh < scenario-dirs
set -euo pipefail
@@ -31,4 +32,5 @@ molecule --version
# The collection under test first; molecule also installs it into each scenario's ANSIBLE_HOME,
# which the run script keeps in the job tree.
export ANSIBLE_COLLECTIONS_PATH="$AC_ROOT:${extra_collections}/opt/collections"
python3 -I scripts/check_scenarios_load_checkout.py <<< "$selected"
exec scripts/run_molecule_scenarios.sh "$AC_ROOT/molecule-runs" <<< "$selected"