fix(ci): support installed yq syntax

- Use portable yq raw-output syntax when enumerating Molecule boxes\n- Preserve repository-scoped Vagrant cache discovery
This commit is contained in:
Timothy Stewart
2026-07-30 22:41:59 -05:00
committed by Techno Tim
parent 665e274820
commit 5bc347aed4
+3 -5
View File
@@ -9,14 +9,12 @@ set -euo pipefail
GIT_ROOT=$(git rev-parse --show-toplevel) GIT_ROOT=$(git rev-parse --show-toplevel)
PROVIDER=virtualbox PROVIDER=virtualbox
yq --version
# Define the path to the molecule.yml files # Define the path to the molecule.yml files
MOLECULE_YML_PATH="${GIT_ROOT}/molecule/*/molecule.yml" MOLECULE_YML_PATH=("${GIT_ROOT}"/molecule/*/molecule.yml)
# Extract and sort unique boxes from all molecule.yml files # Extract and sort unique boxes from all molecule.yml files
all_boxes=$(for file in $MOLECULE_YML_PATH; do all_boxes=$(for file in "${MOLECULE_YML_PATH[@]}"; do
yq eval '.platforms[].box' "$file" yq -r '.platforms[].box' "$file"
done | sort -u) done | sort -u)
echo all_boxes: "$all_boxes" echo all_boxes: "$all_boxes"