From 9f36624799f0344e6f5aac4b0843199a35f82f1a Mon Sep 17 00:00:00 2001 From: Taylor McKinnon Date: Tue, 19 Sep 2023 13:39:10 -0700 Subject: [PATCH] impr(UTAPI-96): Switch to scality/actions/action-ssh-to-runner --- .github/workflows/tests.yaml | 40 +++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ece6e452..5633db75 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -4,8 +4,20 @@ name: tests on: push: branches-ignore: - - 'development/**' + - 'development/**' + workflow_dispatch: + inputs: + debug: + description: Debug (enable the ability to SSH to runners) + type: boolean + required: false + default: 'false' + connection-timeout-m: + type: number + required: false + description: Timeout for ssh connection to worker (minutes) + default: 30 jobs: build-ci: uses: ./.github/workflows/build-ci.yaml @@ -233,9 +245,16 @@ jobs: UTAPI_SERVICE_USER_ENABLED: 'true' UTAPI_LOG_LEVEL: trace SETUP_CMD: "run start_v2:server" - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - if: failure() + - name: 'Debug: SSH to runner' + uses: scality/actions/action-ssh-to-runner@1.6.0 + timeout-minutes: ${{ fromJSON(github.event.inputs.connection-timeout-m) }} + continue-on-error: true + with: + 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 }} + if: ${{ ( github.event.inputs.debug == true || github.event.inputs.debug == 'true' ) }} tests-v2-without-sensision: needs: @@ -348,6 +367,13 @@ jobs: - name: ${{ matrix.test.name }} run: ${{ matrix.test.command }} env: ${{ matrix.test.env }} - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - if: failure() + - name: 'Debug: SSH to runner' + uses: scality/actions/action-ssh-to-runner@1.6.0 + timeout-minutes: ${{ fromJSON(github.event.inputs.connection-timeout-m) }} + continue-on-error: true + with: + 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 }} + if: ${{ ( github.event.inputs.debug == true || github.event.inputs.debug == 'true' ) }}