From fb13b5cad06e466eab4fbb935f9c214f700fd6cb Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Mon, 27 Sep 2021 16:09:45 +0530 Subject: [PATCH] ci: run tmate session only on PR run tmate only for `pull_request` event and remove for other events. As during release when tests fail it takes extra 30 min to fail the test or someone manually has to end the test which is painfully especially during release time. Signed-off-by: subhamkrai --- .github/workflows/canary-integration-test.yml | 44 +++++++++---------- .../integration-test-helm-suite.yaml | 4 +- .../workflows/integration-test-mgr-suite.yaml | 4 +- .../integration-test-multi-cluster-suite.yaml | 4 +- .../integration-test-object-suite.yaml | 4 +- .../integration-test-smoke-suite.yaml | 4 +- .../integration-test-upgrade-suite.yaml | 4 +- .../integration-tests-on-release.yaml | 25 ----------- 8 files changed, 34 insertions(+), 59 deletions(-) diff --git a/.github/workflows/canary-integration-test.yml b/.github/workflows/canary-integration-test.yml index 93cb408bc..81f1994b6 100644 --- a/.github/workflows/canary-integration-test.yml +++ b/.github/workflows/canary-integration-test.yml @@ -91,8 +91,8 @@ jobs: name: canary path: test - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 @@ -171,8 +171,8 @@ jobs: name: pvc path: test - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 @@ -238,8 +238,8 @@ jobs: name: pvc-db path: test - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 @@ -309,8 +309,8 @@ jobs: name: pvc-db-wal path: test - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 @@ -379,8 +379,8 @@ jobs: name: encryption-pvc path: test - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 @@ -449,8 +449,8 @@ jobs: name: encryption-pvc-db-wal path: test - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 @@ -520,8 +520,8 @@ jobs: name: encryption-pvc-db path: test - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 @@ -608,8 +608,8 @@ jobs: name: encryption-pvc-kms-vault-token-auth path: test - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 @@ -673,8 +673,8 @@ jobs: name: lvm-pvc path: test - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 @@ -878,8 +878,8 @@ jobs: name: multi-cluster-mirroring path: test - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 @@ -960,7 +960,7 @@ jobs: name: rgw-multisite-testing path: test - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 diff --git a/.github/workflows/integration-test-helm-suite.yaml b/.github/workflows/integration-test-helm-suite.yaml index 644cd514a..ffd3d1664 100644 --- a/.github/workflows/integration-test-helm-suite.yaml +++ b/.github/workflows/integration-test-helm-suite.yaml @@ -63,7 +63,7 @@ jobs: name: ceph-helm-suite-artifact path: /home/runner/work/rook/rook/tests/integration/_output/tests/ - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 diff --git a/.github/workflows/integration-test-mgr-suite.yaml b/.github/workflows/integration-test-mgr-suite.yaml index c8d5ca07e..a756a3971 100644 --- a/.github/workflows/integration-test-mgr-suite.yaml +++ b/.github/workflows/integration-test-mgr-suite.yaml @@ -55,7 +55,7 @@ jobs: name: ceph-mgr-suite-artifact path: /home/runner/work/rook/rook/tests/integration/_output/tests/ - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 diff --git a/.github/workflows/integration-test-multi-cluster-suite.yaml b/.github/workflows/integration-test-multi-cluster-suite.yaml index 28c774dc1..74c508159 100644 --- a/.github/workflows/integration-test-multi-cluster-suite.yaml +++ b/.github/workflows/integration-test-multi-cluster-suite.yaml @@ -59,7 +59,7 @@ jobs: name: ceph-multi-cluster-deploy-suite-artifact path: /home/runner/work/rook/rook/tests/integration/_output/tests/ - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 diff --git a/.github/workflows/integration-test-object-suite.yaml b/.github/workflows/integration-test-object-suite.yaml index 5d13dd218..3ebc2e979 100644 --- a/.github/workflows/integration-test-object-suite.yaml +++ b/.github/workflows/integration-test-object-suite.yaml @@ -58,7 +58,7 @@ jobs: name: ceph-smoke-suite-artifact path: /home/runner/work/rook/rook/tests/integration/_output/tests/ - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 diff --git a/.github/workflows/integration-test-smoke-suite.yaml b/.github/workflows/integration-test-smoke-suite.yaml index a3fe5ff45..b17a9eb24 100644 --- a/.github/workflows/integration-test-smoke-suite.yaml +++ b/.github/workflows/integration-test-smoke-suite.yaml @@ -59,7 +59,7 @@ jobs: name: ceph-smoke-suite-artifact path: /home/runner/work/rook/rook/tests/integration/_output/tests/ - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 diff --git a/.github/workflows/integration-test-upgrade-suite.yaml b/.github/workflows/integration-test-upgrade-suite.yaml index b5f79372c..29df92285 100644 --- a/.github/workflows/integration-test-upgrade-suite.yaml +++ b/.github/workflows/integration-test-upgrade-suite.yaml @@ -58,7 +58,7 @@ jobs: name: ceph-upgrade-suite-artifact path: /home/runner/work/rook/rook/tests/integration/_output/tests/ - - name: setup tmate session for debugging - if: failure() + - name: setup tmate session for debugging when event is PR + if: failure() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 diff --git a/.github/workflows/integration-tests-on-release.yaml b/.github/workflows/integration-tests-on-release.yaml index df3c39c6d..766b57bfe 100644 --- a/.github/workflows/integration-tests-on-release.yaml +++ b/.github/workflows/integration-tests-on-release.yaml @@ -64,11 +64,6 @@ jobs: name: ceph-helm-suite-artifact path: /home/runner/work/rook/rook/tests/integration/_output/tests/ - - name: setup tmate session for debugging - if: failure() - uses: mxschmitt/action-tmate@v3 - timeout-minutes: 30 - TestCephMultiClusterDeploySuite: runs-on: ubuntu-18.04 strategy: @@ -116,11 +111,6 @@ jobs: name: ceph-multi-cluster-deploy-suite-artifact path: /home/runner/work/rook/rook/tests/integration/_output/tests/ - - name: setup tmate session for debugging - if: failure() - uses: mxschmitt/action-tmate@v3 - timeout-minutes: 30 - TestCephSmokeSuite: runs-on: ubuntu-18.04 strategy: @@ -167,11 +157,6 @@ jobs: name: ceph-smoke-suite-artifact path: /home/runner/work/rook/rook/tests/integration/_output/tests/ - - name: setup tmate session for debugging - if: failure() - uses: mxschmitt/action-tmate@v3 - timeout-minutes: 30 - TestCephUpgradeSuite: runs-on: ubuntu-18.04 strategy: @@ -218,11 +203,6 @@ jobs: name: ceph-upgrade-suite-artifact path: /home/runner/work/rook/rook/tests/integration/_output/tests/ - - name: setup tmate session for debugging - if: failure() - uses: mxschmitt/action-tmate@v3 - timeout-minutes: 30 - TestCephObjectSuite: if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} runs-on: ubuntu-18.04 @@ -269,8 +249,3 @@ jobs: with: name: ceph-smoke-suite-artifact path: /home/runner/work/rook/rook/tests/integration/_output/tests/ - - - name: setup tmate session for debugging - if: failure() - uses: mxschmitt/action-tmate@v3 - timeout-minutes: 60