mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2026-10-23 20:22:03 +02:00
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:
1 parent
7e9cad573e
commit
116fc10c67
1 file changed
+3
-5
@@ -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"
|
||||||
|
|||||||
Reference in new issue
Block a user