Skip to content

Commit 991594e

Browse files
committed
address integration test failures
1 parent ddf72c3 commit 991594e

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/integration_test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,35 @@ jobs:
322322
echo " Ensure .fixtures.yml includes stdlib and that \"bundle exec rake spec_prep\" ran."
323323
fi
324324
325+
- name: Verify puppet CLI on all test targets (required)
326+
env: { BOLT_GEM: "1" }
327+
shell: bash
328+
run: |
329+
set -Eeuo pipefail
330+
set -o pipefail
331+
332+
MASTER='${{ steps.pe-master.outputs.master_uri }}'
333+
MASTER=${MASTER//\"/}; MASTER=${MASTER//\'/}
334+
335+
ALL="$(ruby -ryaml -e '
336+
inv = YAML.load_file("spec/fixtures/litmus_inventory.yaml")
337+
puts inv.fetch("groups",[]).flat_map{|g| g.fetch("targets",[]) }.map{|t| t["uri"]}.join(",")
338+
')"
339+
[[ -n "$ALL" ]] || { echo "No targets found in inventory"; exit 3; }
340+
341+
bundle exec bolt command run "/bin/bash -lc '
342+
set -Eeuo pipefail
343+
if command -v puppet >/dev/null 2>&1 || [ -x /opt/puppetlabs/bin/puppet ]; then
344+
exit 0
345+
fi
346+
echo \"Attempting to install puppet-agent from https://${MASTER}:8140...\" >&2
347+
if curl -fsSLk https://${MASTER}:8140/packages/current/install.bash | bash; then
348+
exit 0
349+
fi
350+
echo \"ERROR: puppet CLI still missing after install attempt\" >&2
351+
exit 1
352+
'" -i spec/fixtures/litmus_inventory.yaml --targets "$ALL" --run-as root
353+
325354
- name: Run integration tests
326355
run: |
327356
bundle exec rake ntp:integration

0 commit comments

Comments
 (0)