Skip to content

Commit 4c52459

Browse files
committed
fix --recursive
1 parent 991594e commit 4c52459

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/integration_test.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ jobs:
293293
set -Eeuo pipefail
294294
set -o pipefail
295295
296+
# Collect all targets (server + clients)
296297
ALL="$(ruby -ryaml -e '
297298
inv = YAML.load_file("spec/fixtures/litmus_inventory.yaml")
298299
puts inv.fetch("groups",[]).flat_map{|g| g.fetch("targets",[]) }.map{|t| t["uri"]}.join(",")
@@ -301,21 +302,25 @@ jobs:
301302
302303
if [ -d spec/fixtures/modules/stdlib ]; then
303304
echo "Staging puppetlabs-stdlib to targets..."
305+
# Ensure modules root exists and clean out any previous stdlib copy
304306
bundle exec bolt command run "/bin/bash -lc '
305307
set -Eeuo pipefail
306-
mkdir -p /etc/puppetlabs/code/environments/production/modules
307-
rm -rf /etc/puppetlabs/code/environments/production/modules/stdlib
308-
mkdir -p /etc/puppetlabs/code/environments/production/modules/stdlib
308+
MODROOT=/etc/puppetlabs/code/environments/production/modules
309+
mkdir -p \"$MODROOT\"
310+
rm -rf \"$MODROOT/stdlib\"
309311
'" -i spec/fixtures/litmus_inventory.yaml --targets "$ALL" --run-as root
310312
311-
bundle exec bolt file upload spec/fixtures/modules/stdlib/ \
312-
/etc/puppetlabs/code/environments/production/modules/stdlib \
313-
--recursive \
313+
# Upload the stdlib directory to the modules root (Bolt copies recursively by default)
314+
bundle exec bolt file upload spec/fixtures/modules/stdlib \
315+
/etc/puppetlabs/code/environments/production/modules \
314316
-i spec/fixtures/litmus_inventory.yaml \
315317
--targets "$ALL"
316318
319+
# Lightweight verification
317320
bundle exec bolt command run "/bin/bash -lc '
318-
test -f /etc/puppetlabs/code/environments/production/modules/stdlib/metadata.json && echo \"stdlib present\" || (echo \"stdlib missing\" >&2; exit 1)
321+
test -f /etc/puppetlabs/code/environments/production/modules/stdlib/metadata.json \
322+
&& echo \"stdlib present\" \
323+
|| (echo \"stdlib missing\" >&2; exit 1)
319324
'" -i spec/fixtures/litmus_inventory.yaml --targets "$ALL" --run-as root
320325
else
321326
echo "WARN: spec/fixtures/modules/stdlib not present."

0 commit comments

Comments
 (0)