@@ -286,6 +286,42 @@ jobs:
286286 --targets "$ALL" \
287287 --run-as root || true
288288
289+ - name : Upload stdlib from fixtures to targets
290+ env : { BOLT_GEM: "1" }
291+ shell : bash
292+ run : |
293+ set -Eeuo pipefail
294+ set -o pipefail
295+
296+ ALL="$(ruby -ryaml -e '
297+ inv = YAML.load_file("spec/fixtures/litmus_inventory.yaml")
298+ puts inv.fetch("groups",[]).flat_map{|g| g.fetch("targets",[]) }.map{|t| t["uri"]}.join(",")
299+ ')"
300+ [[ -n "$ALL" ]] || { echo "No targets found in inventory"; exit 3; }
301+
302+ if [ -d spec/fixtures/modules/stdlib ]; then
303+ echo "Staging puppetlabs-stdlib to targets..."
304+ bundle exec bolt command run "/bin/bash -lc '
305+ 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
309+ '" -i spec/fixtures/litmus_inventory.yaml --targets "$ALL" --run-as root
310+
311+ bundle exec bolt file upload spec/fixtures/modules/stdlib/ \
312+ /etc/puppetlabs/code/environments/production/modules/stdlib \
313+ --recursive \
314+ -i spec/fixtures/litmus_inventory.yaml \
315+ --targets "$ALL"
316+
317+ 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)
319+ '" -i spec/fixtures/litmus_inventory.yaml --targets "$ALL" --run-as root
320+ else
321+ echo "WARN: spec/fixtures/modules/stdlib not present."
322+ echo " Ensure .fixtures.yml includes stdlib and that \"bundle exec rake spec_prep\" ran."
323+ fi
324+
289325 - name : Run integration tests
290326 run : |
291327 bundle exec rake ntp:integration
0 commit comments