From a0e8a6727e01530b39b92bfa15344f77d04456a8 Mon Sep 17 00:00:00 2001 From: "laurence.barker@dvsa.gov.uk" Date: Thu, 9 Jan 2025 12:28:52 +0000 Subject: [PATCH] feat: make timeout dynamic based on timeout input var --- .github/workflows/e2etest.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2etest.yaml b/.github/workflows/e2etest.yaml index bb84cb909..5d32f6a91 100644 --- a/.github/workflows/e2etest.yaml +++ b/.github/workflows/e2etest.yaml @@ -74,10 +74,21 @@ jobs: buildtime=$(date +"%Y%m%d%H%M%S") echo "job_name=e2e-$buildtime-${{ github.run_id }}" >> $GITHUB_OUTPUT + Calculate-Timeout: + name: Calculate Timeout + runs-on: ubuntu-latest + outputs: + timeout: ${{ steps.set-timeout.outputs.timeout }} + steps: + - name: Set Timeout + id: set-timeout + run: | + echo "timeout=$(( ${{ inputs.batch_timeout_minutes }} + 5 ))" >> $GITHUB_OUTPUT + run-batch: name: Run Tests on AWS Batch - timeout-minutes: ${{ inputs.batch_timeout_minutes }} - needs: create-job-name + timeout-minutes: ${{ needs.Calculate-Timeout.outputs.timeout }} + needs: [create-job-name, Calculate-Timeout] runs-on: ubuntu-latest outputs: job_id: ${{ steps.submit-job.outputs.job_id }}