From 56ab10b06a5d2e2888726530459674314abc8a3d Mon Sep 17 00:00:00 2001 From: Maha Benzekri Date: Fri, 1 Mar 2024 11:02:34 +0100 Subject: [PATCH] ZENKO-4749: Enabling ssh login to CI --- .github/actions/debug-wait/action.yaml | 21 +++++++++------------ .github/workflows/end2end.yaml | 9 +++++++++ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/actions/debug-wait/action.yaml b/.github/actions/debug-wait/action.yaml index 58ee86e72..5f15cfa1a 100644 --- a/.github/actions/debug-wait/action.yaml +++ b/.github/actions/debug-wait/action.yaml @@ -2,18 +2,15 @@ name: "Debug wait" description: "If debugging is enabled, wait" -inputs: - ENABLE_DEBUG: - description: enabling debug wait - required: true - default: "false" - runs: using: composite steps: - - name: Archive artifact logs and data - shell: bash - run: |- - if [ $ENABLE_DEBUG = 'true' ]; then - while true; do sleep 10; echo sleep; done - fi + - name: "Debug: SSH to runner" + uses: scality/actions/action-ssh-to-runner@1.6.0 + continue-on-error: true + with: + tmate-server-host: ${{ env.TMATE_SERVER_HOST }} + tmate-server-port: ${{ env.TMATE_SERVER_PORT }} + tmate-server-rsa-fingerprint: ${{ env.TMATE_SERVER_RSA_FINGERPRINT }} + tmate-server-ed25519-fingerprint: ${{ env.TMATE_SERVER_ED25519_FINGERPRINT }} + if: failure() && runner.debug == '1' diff --git a/.github/workflows/end2end.yaml b/.github/workflows/end2end.yaml index 156cdd5d8..a6366e25f 100644 --- a/.github/workflows/end2end.yaml +++ b/.github/workflows/end2end.yaml @@ -99,6 +99,11 @@ env: TILT_VERSION: "0.23.4" KIND_VERSION: "v0.12.0" ZENKO_ENABLE_SOSAPI: false + # DEBUG WAIT + TMATE_SERVER_HOST: ${{ secrets.TMATE_SERVER_HOST }} + TMATE_SERVER_PORT: ${{ secrets.TMATE_SERVER_PORT }} + TMATE_SERVER_RSA_FINGERPRINT: ${{ secrets.TMATE_SERVER_RSA_FINGERPRINT }} + TMATE_SERVER_ED25519_FINGERPRINT: ${{ secrets.TMATE_SERVER_ED25519_FINGERPRINT }} jobs: check-dashboard-versions: @@ -403,6 +408,7 @@ jobs: working-directory: ./.github/scripts/end2end - name: Debug wait uses: ./.github/actions/debug-wait + timeout-minutes: 60 - name: Archive artifact logs and data uses: ./.github/actions/archive-artifacts env: @@ -470,6 +476,7 @@ jobs: # working-directory: ./.github/scripts/end2end - name: Debug wait uses: ./.github/actions/debug-wait + timeout-minutes: 60 - name: Archive artifact logs and data uses: ./.github/actions/archive-artifacts env: @@ -526,6 +533,7 @@ jobs: working-directory: ./.github/scripts/end2end - name: Debug wait uses: ./.github/actions/debug-wait + timeout-minutes: 60 - name: Archive artifact logs and data uses: ./.github/actions/archive-artifacts env: @@ -586,6 +594,7 @@ jobs: working-directory: ./.github/scripts/end2end - name: Debug wait uses: ./.github/actions/debug-wait + timeout-minutes: 60 - name: Archive artifact logs and data uses: ./.github/actions/archive-artifacts env: