Skip to content

Commit 0f98013

Browse files
committed
Add artifacts from job
1 parent 8e0b7c3 commit 0f98013

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.github/workflows/incus.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,19 @@ jobs:
4747
with:
4848
sparse-checkout: |
4949
utils/incus_report.sh
50+
utils/incus_artifacts.sh
5051
sparse-checkout-cone-mode: false
5152
- name: Verify Puppet Prometheus report for errors
5253
run: |
5354
incus project switch ${{ steps.create_cluster.outputs.incus_project }}
5455
bash utils/incus_report.sh >> $GITHUB_STEP_SUMMARY
55-
56+
- name: Recover artifacts from containers
57+
run: |
58+
mkdir artifacts
59+
cd artifacts/
60+
bash ../utils/incus_artifacts.sh
61+
- name: 'Upload Artifacts'
62+
uses: actions/upload-artifact@v6
63+
with:
64+
name: puppet-apply-artifacts
65+
path: artifacts/*

utils/incus_artifacts.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
puppet_server=$(incus list --columns "nd" -f csv | grep \"puppet\" | cut -d',' -f1)
4+
5+
for nodename in $(incus list -c n -f csv); do
6+
incus file pull $puppet_server/var/lib/node_exporter/puppet_report_${nodename}.prom .
7+
incus exec $nodename -- journalctl -u puppet -o json > journalctl-puppet-${nodename}.json
8+
done

0 commit comments

Comments
 (0)