Skip to content

Commit

Permalink
fix: add retry to cleanup (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
Langleu authored Sep 30, 2024
1 parent 9d7dd47 commit 1891b55
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/daily-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,23 @@ jobs:
tf-bucket-region: ${{ env.TF_S3_REGION }}
max-age-hours-cluster: ${{ env.MAX_AGE_HOURS_CLUSTER }}

# There are cases where the deletion of resources fails due to dependencies.
- name: Retry delete clusters
id: retry_delete_clusters
if: failure() && steps.delete_clusters.outcome == 'failure'
timeout-minutes: 125
uses: ./.github/actions/rosa-cleanup-clusters
env:
RH_TOKEN: ${{ steps.secrets.outputs.RH_OPENSHIFT_TOKEN }}
AWS_REGION: ${{ env.TESTS_AWS_REGION }}
with:
tf-bucket: ${{ env.TF_S3_BUCKET }}
tf-bucket-region: ${{ env.TF_S3_REGION }}
max-age-hours-cluster: ${{ env.MAX_AGE_HOURS_CLUSTER }}

- name: Notify in Slack in case of failure
id: slack-notification
if: failure() && github.event_name == 'schedule'
if: failure() && github.event_name == 'schedule' && steps.retry_delete_clusters.outcome == 'failure'
uses: camunda/infraex-common-config/.github/actions/report-failure-on-slack@fd70dca436c5764e6e90fa6613e7f0adebb83b6d # main
with:
vault_addr: ${{ secrets.VAULT_ADDR }}
Expand Down

0 comments on commit 1891b55

Please sign in to comment.