Skip to content

Commit

Permalink
Merge pull request #940 from stackhpc/yoga-fix-tf-retries
Browse files Browse the repository at this point in the history
CI: Fail aio job when Terraform reaches max attempts
  • Loading branch information
markgoddard authored Feb 14, 2024
2 parents f12e38d + 2257103 commit 4837c8d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/stackhpc-all-in-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,15 @@ jobs:
for attempt in $(seq 5); do
if terraform apply -auto-approve; then
echo "Created infrastructure on attempt $attempt"
break
exit 0
fi
echo "Failed to create infrastructure on attempt $attempt"
sleep 10
terraform destroy -auto-approve
sleep 60
done
echo "Failed to create infrastructure after $attempt attempts"
exit 1
working-directory: ${{ github.workspace }}/terraform/aio
env:
OS_CLOUD: ${{ inputs.OS_CLOUD }}
Expand Down

0 comments on commit 4837c8d

Please sign in to comment.