File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -479,12 +479,19 @@ jobs:
479479 id : diagnostics
480480 run : |
481481 mkdir -p diagnostics
482+ # Depending on when the failure happened, the diagnostics playbook
483+ # may be in different locations.
484+ if [ -f etc/kayobe/ansible/tools/diagnostics.yml ]; then
485+ DIAGNOSTICS_PLAYBOOK='$KAYOBE_CONFIG_PATH/ansible/tools/diagnostics.yml'
486+ else
487+ DIAGNOSTICS_PLAYBOOK='$KAYOBE_CONFIG_PATH/ansible/diagnostics.yml'
488+ fi
482489 sudo -E docker run -t --rm \
483490 -v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
484491 -v $(pwd)/diagnostics:/stack/diagnostics \
485492 -e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
486493 $KAYOBE_IMAGE \
487- /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/tools/diagnostics.yml'
494+ /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh "$DIAGNOSTICS_PLAYBOOK"
488495 env :
489496 KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
490497 if : ${{ !cancelled() && steps.tf_apply.outcome == 'success' }}
You can’t perform that action at this time.
0 commit comments