From 84cd0de775b376c31d3fa2e41c769c8ebc58dcab Mon Sep 17 00:00:00 2001 From: Laveena Enid <109572422+laveena-en@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:27:40 +0530 Subject: [PATCH] CI: Fixed the payload for TBD action (#35121) ## Description Attached the attempt and changed the workflow name in order to trigger slack workflow > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="" ### :mag: Cypress test results > [!CAUTION] > If you modify the content in this section, you are likely to disrupt the CI result for your PR. ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **New Features** - Improved automation for analyzing Cypress test runs with refined conditional logic. - Enhanced data sent in analysis requests, including a new attempt number field for better traceability. - **Bug Fixes** - Ensured the automated analysis workflow only triggers under specific conditions, preventing unnecessary executions. Signed-off-by: Laveena Enid --- .github/workflows/test-build-docker-image.yml | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test-build-docker-image.yml b/.github/workflows/test-build-docker-image.yml index 64016c5ea7..2a874e3e51 100644 --- a/.github/workflows/test-build-docker-image.yml +++ b/.github/workflows/test-build-docker-image.yml @@ -227,20 +227,22 @@ jobs: # This step triggers an external workflow for automated analysis of Cypress test runs. - name: Invoke Automated analysis workflow + if: ( always() && github.ref == 'refs/heads/release' && github.run_attempt <= 2) run: | curl --location --request POST ${{secrets.CYPRESS_WORKFLOW_API}} \ --header 'x-appsmith-key: ${{ secrets.CYPRESS_WORKFLOW_KEY }}' \ --header 'Content-Type: application/json' \ - --data-raw '{ "workflow_id" : ${{ github.run_id }} , - "commit_id" : "${{ github.sha }}" , - "repo" : "${{ github.event.repository.full_name }}" , - "task" : "${{ github.job }}" , - "workflow_type" : "${{ github.event_name }}", - "workflow_name" : "${{ github.workflow }}", - "job_id" : "", - "job_data": { - "ci_test_result_sample_data" : "sample_data" - } + --data-raw '{ "workflow_id" : ${{ github.run_id }} , + "commit_id" : "${{ github.sha }}" , + "repo" : "${{ github.event.repository.full_name }}" , + "task" : "${{ github.job }}" , + "workflow_type" : "${{ github.event_name }}", + "workflow_name" : "TBD", + "job_id" : "", + "attempt" : "${{ github.run_attempt }}", + "job_data": { + "ci_test_result_sample_data" : "sample_data" + } }' # Force save the CI failed spec list into a cache