Skip to content

Commit 9507353

Browse files
committed
CI: Collect diagnostic information at end of aio jobs
Use the new diagnostics.yml playbook. (cherry picked from commit 834110b)
1 parent c1f5cd4 commit 9507353

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

.github/workflows/stackhpc-all-in-one.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ jobs:
156156
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
157157

158158
- name: Terraform Apply
159+
id: tf_apply
159160
run: |
160161
for attempt in $(seq 5); do
161162
if terraform apply -auto-approve; then
@@ -290,6 +291,7 @@ jobs:
290291
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
291292

292293
- name: Tempest tests
294+
id: tempest
293295
run: |
294296
mkdir -p tempest-artifacts
295297
docker run -t --rm \
@@ -301,11 +303,28 @@ jobs:
301303
env:
302304
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
303305

306+
- name: Collect diagnostic information
307+
id: diagnostics
308+
run: |
309+
mkdir -p diagnostics
310+
sudo -E docker run -t --rm \
311+
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
312+
-v $(pwd)/diagnostics:/stack/diagnostics \
313+
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
314+
$KAYOBE_IMAGE \
315+
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/diagnostics.yml'
316+
env:
317+
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
318+
if: ${{ always() && steps.tf_apply.outcome == 'success' }}
319+
304320
- name: Upload test result artifacts
305321
uses: actions/upload-artifact@v4
306322
with:
307-
name: tempest-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}
308-
path: tempest-artifacts/*
323+
name: test-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}
324+
path: |
325+
diagnostics/
326+
tempest-artifacts/
327+
if: ${{ always() && (steps.tempest.outcome == 'success' || steps.diagnostics.outcome == 'success') }}
309328

310329
- name: Fail if any Tempest tests failed
311330
run: |

0 commit comments

Comments
 (0)