Skip to content

Commit 4837c8d

Browse files
authored
Merge pull request #940 from stackhpc/yoga-fix-tf-retries
CI: Fail aio job when Terraform reaches max attempts
2 parents f12e38d + 2257103 commit 4837c8d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,15 @@ jobs:
158158
for attempt in $(seq 5); do
159159
if terraform apply -auto-approve; then
160160
echo "Created infrastructure on attempt $attempt"
161-
break
161+
exit 0
162162
fi
163163
echo "Failed to create infrastructure on attempt $attempt"
164164
sleep 10
165165
terraform destroy -auto-approve
166166
sleep 60
167167
done
168+
echo "Failed to create infrastructure after $attempt attempts"
169+
exit 1
168170
working-directory: ${{ github.workspace }}/terraform/aio
169171
env:
170172
OS_CLOUD: ${{ inputs.OS_CLOUD }}

0 commit comments

Comments
 (0)