Skip to content

Commit 7c1f3be

Browse files
priteauAlex-Welsh
authored andcommitted
CI: Fix path to diagnostics playbook for upgrades
1 parent 743682b commit 7c1f3be

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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' }}

0 commit comments

Comments
 (0)