@@ -156,6 +156,7 @@ jobs:
156
156
OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
157
157
158
158
- name : Terraform Apply
159
+ id : tf_apply
159
160
run : |
160
161
for attempt in $(seq 5); do
161
162
if terraform apply -auto-approve; then
@@ -290,6 +291,7 @@ jobs:
290
291
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
291
292
292
293
- name : Tempest tests
294
+ id : tempest
293
295
run : |
294
296
mkdir -p tempest-artifacts
295
297
docker run -t --rm \
@@ -301,11 +303,28 @@ jobs:
301
303
env :
302
304
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
303
305
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
+
304
320
- name : Upload test result artifacts
305
321
uses : actions/upload-artifact@v4
306
322
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') }}
309
328
310
329
- name : Fail if any Tempest tests failed
311
330
run : |
0 commit comments