Skip to content

Commit

Permalink
fix(ci): Cleanup CloudFormation stack when EKS cluster creation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
orfeas-k committed Dec 3, 2024
1 parent 881142b commit 5bee354
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/deploy-to-eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,14 @@ jobs:
VERSION_WITHOUT_DOT="${VERSION//.}"
eksctl delete cluster --region eu-central-1 --name=kubeflow-test-$VERSION_WITHOUT_DOT
# Clean up leftover CloudFormation stack when cluster creation fails unexpectedly
- name: Delete CloudFormation stack (if present)
if: always()
run: |
VERSION=${{ matrix.bundle_version }}
VERSION_WITHOUT_DOT="${VERSION//.}"
aws cloudformation delete-stack --region eu-central-1 --stack-name eksctl-kubeflow-test-$VERSION_WITHOUT_DOT-cluster
delete-unattached-volumes:
if: always()
uses: ./.github/workflows/delete-aws-volumes.yaml
Expand Down

0 comments on commit 5bee354

Please sign in to comment.