@@ -179,6 +179,7 @@ jobs:
179
179
OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
180
180
181
181
- name : Terraform Apply
182
+ id : tf_apply
182
183
run : |
183
184
for attempt in $(seq 5); do
184
185
if terraform apply -auto-approve; then
@@ -355,6 +356,7 @@ jobs:
355
356
if : inputs.upgrade
356
357
357
358
- name : Tempest tests
359
+ id : tempest
358
360
run : |
359
361
mkdir -p tempest-artifacts
360
362
docker run -t --rm \
@@ -366,11 +368,28 @@ jobs:
366
368
env :
367
369
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
368
370
371
+ - name : Collect diagnostic information
372
+ id : diagnostics
373
+ run : |
374
+ mkdir -p diagnostics
375
+ sudo -E docker run -t --rm \
376
+ -v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
377
+ -v $(pwd)/diagnostics:/stack/diagnostics \
378
+ -e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
379
+ $KAYOBE_IMAGE \
380
+ /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/diagnostics.yml'
381
+ env :
382
+ KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
383
+ if : ${{ !cancelled() && steps.tf_apply.outcome == 'success' }}
384
+
369
385
- name : Upload test result artifacts
370
386
uses : actions/upload-artifact@v4
371
387
with :
372
- name : tempest-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}${{ inputs.upgrade && '-upgrade' }}
373
- path : tempest-artifacts/*
388
+ name : test-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}${{ inputs.upgrade && '-upgrade' || '' }}
389
+ path : |
390
+ diagnostics/
391
+ tempest-artifacts/
392
+ if : ${{ !cancelled() && (steps.tempest.outcome == 'success' || steps.diagnostics.outcome == 'success') }}
374
393
375
394
- name : Fail if any Tempest tests failed
376
395
run : |
0 commit comments