From e6cf6a9c36acb1474e4b0a1c56708ca2e8b39005 Mon Sep 17 00:00:00 2001 From: dfitchett <135860892+dfitchett@users.noreply.github.com> Date: Wed, 22 Nov 2023 11:41:20 -0800 Subject: [PATCH] Added check for successful merge job --- .github/workflows/ee-ep-merge-end-to-end.yml | 22 +++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ee-ep-merge-end-to-end.yml b/.github/workflows/ee-ep-merge-end-to-end.yml index ddac47513a..e0d2453ade 100644 --- a/.github/workflows/ee-ep-merge-end-to-end.yml +++ b/.github/workflows/ee-ep-merge-end-to-end.yml @@ -120,22 +120,28 @@ jobs: # Allow time to finish processing sleep 5s - - name: 'Test get job ID' - shell: bash - run: | - echo ${{steps.get_job_id.outputs.job_id}} - - name: 'Get Merge Request Status' uses: indiesdev/curl@v1.1 + id: merge_status with: - id: merge_status url: 'http://localhost:8140/merge/${{steps.get_job_id.outputs.job_id}}' method: 'GET' - body: '{"pending_claim_id":1001,"ep400_claim_id":1000}' - accept: 202 + accept: 200 retries: 3 log-response: true + - name: 'Verify Merge Complete' + shell: bash + run: | + state="${{ fromJSON(steps.merge_status.outputs.response).data.job.state }}" + echo $state + if $state != "COMPLETED_SUCCESS"; then + echo "Merge Request completed with error" + echo ${{ steps.merge_status.outputs.response }} + exit 10 + fi + + - name: 'Clean shutdown of all containers' if: always() shell: bash