Skip to content

Commit 23cd87e

Browse files
committed
syntax
1 parent 4c52459 commit 23cd87e

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

.github/workflows/integration_test.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -300,31 +300,40 @@ jobs:
300300
')"
301301
[[ -n "$ALL" ]] || { echo "No targets found in inventory"; exit 3; }
302302
303-
if [ -d spec/fixtures/modules/stdlib ]; then
303+
if [[ -d spec/fixtures/modules/stdlib ]]; then
304304
echo "Staging puppetlabs-stdlib to targets..."
305-
# Ensure modules root exists and clean out any previous stdlib copy
306-
bundle exec bolt command run "/bin/bash -lc '
305+
306+
# Prepare destination on targets (create modules root, remove any stale stdlib)
307+
bundle exec bolt command run '/bin/bash -lc '"'"'
307308
set -Eeuo pipefail
308309
MODROOT=/etc/puppetlabs/code/environments/production/modules
309-
mkdir -p \"$MODROOT\"
310-
rm -rf \"$MODROOT/stdlib\"
311-
'" -i spec/fixtures/litmus_inventory.yaml --targets "$ALL" --run-as root
310+
mkdir -p "$MODROOT"
311+
rm -rf "$MODROOT/stdlib"
312+
'"'"' \
313+
-i spec/fixtures/litmus_inventory.yaml \
314+
--targets "$ALL" \
315+
--run-as root
312316
313-
# Upload the stdlib directory to the modules root (Bolt copies recursively by default)
317+
# Upload the stdlib directory to the modules root
314318
bundle exec bolt file upload spec/fixtures/modules/stdlib \
315319
/etc/puppetlabs/code/environments/production/modules \
316320
-i spec/fixtures/litmus_inventory.yaml \
317321
--targets "$ALL"
318322
319-
# Lightweight verification
320-
bundle exec bolt command run "/bin/bash -lc '
323+
# Verify presence
324+
bundle exec bolt command run '/bin/bash -lc '"'"'
325+
set -Eeuo pipefail
321326
test -f /etc/puppetlabs/code/environments/production/modules/stdlib/metadata.json \
322-
&& echo \"stdlib present\" \
323-
|| (echo \"stdlib missing\" >&2; exit 1)
324-
'" -i spec/fixtures/litmus_inventory.yaml --targets "$ALL" --run-as root
327+
&& echo "stdlib present" \
328+
|| { echo "stdlib missing" >&2; exit 1; }
329+
'"'"' \
330+
-i spec/fixtures/litmus_inventory.yaml \
331+
--targets "$ALL" \
332+
--run-as root
325333
else
326-
echo "WARN: spec/fixtures/modules/stdlib not present."
327-
echo " Ensure .fixtures.yml includes stdlib and that \"bundle exec rake spec_prep\" ran."
334+
echo "ERROR: spec/fixtures/modules/stdlib not present."
335+
echo " Ensure .fixtures.yml includes stdlib and that \"bundle exec rake spec_prep\" ran."
336+
exit 1
328337
fi
329338
330339
- name: Verify puppet CLI on all test targets (required)

0 commit comments

Comments
 (0)