From a7cbde9207c4e9077e3df1c9c68272383a2cc039 Mon Sep 17 00:00:00 2001 From: Salah Al Saleh Date: Mon, 28 Aug 2023 14:15:41 -0700 Subject: [PATCH] Always cleanup c11y clusters because we generate support bundles (#4020) * Always cleanup c11y clusters because we generate support bundles --- .github/actions/kots-e2e/action.yml | 2 +- .github/workflows/build-test.yaml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/actions/kots-e2e/action.yml b/.github/actions/kots-e2e/action.yml index 44db74b732..4ddafaaa11 100644 --- a/.github/actions/kots-e2e/action.yml +++ b/.github/actions/kots-e2e/action.yml @@ -153,7 +153,7 @@ runs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 - if: ${{ inputs.k8s-cluster-skip-teardown != 'true' && steps.create-cluster.outputs.cluster-id != '' }} + if: ${{ always() && inputs.k8s-cluster-skip-teardown != 'true' && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ inputs.replicated-api-token }} diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 2c209a0309..adc9e848dc 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -1041,6 +1041,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -1150,6 +1151,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -1338,6 +1340,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -1490,6 +1493,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -1585,6 +1589,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -1680,6 +1685,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -1796,6 +1802,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -1927,6 +1934,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -2180,6 +2188,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -2247,6 +2256,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.kots-e2e.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -2311,6 +2321,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.kots-e2e.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -2375,6 +2386,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.kots-e2e.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -2511,6 +2523,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -2692,6 +2705,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -2978,6 +2992,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -3072,6 +3087,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -3266,6 +3282,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }} @@ -3429,6 +3446,7 @@ jobs: - name: Remove Cluster id: remove-cluster uses: replicatedhq/replicated-actions/remove-cluster@v1 + if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }} continue-on-error: true with: api-token: ${{ secrets.C11Y_MATRIX_TOKEN }}