ci: Cypress Push Slack notification handling build failures (#27234)

## Description
- This PR updates the slack notification link from Cypress dashboard to
Build failures Git actions link incase of any build failure
This commit is contained in:
Aishwarya-U-R 2023-09-12 21:22:06 +05:30 committed by GitHub
parent c1b49739e2
commit d50edbca7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View File

@ -463,9 +463,12 @@ jobs:
if [[ "${{ steps.test_status.outputs.run_result }}" == "failedtest" ]]; then
echo "slack_message=There are test failures in the run. Please check the <https://internal.appsmith.com/app/cypressdashboard/rundetails-64ec3df0c632e24c00764938?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}&selectiontype=test&testsstatus=failed&specsstatus=fail|Cypress dashboard> for more details." >> $GITHUB_OUTPUT
echo "slack_color=#FF0000" >> $GITHUB_OUTPUT
else
echo "slack_message=All tests passed successfully :tada: . Cypress Dashboard: <https://internal.appsmith.com/app/cypressdashboard/rundetails-64ec3df0c632e24c00764938?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}|Click here!>" >> $GITHUB_OUTPUT
elif [[ ${{ needs.ci-test.result }} == 'success' ]]; then
echo "slack_message=All tests passed successfully :tada: Cypress Dashboard: <https://internal.appsmith.com/app/cypressdashboard/rundetails-64ec3df0c632e24c00764938?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}|Click here!>" >> $GITHUB_OUTPUT
echo "slack_color=#00FF00" >> $GITHUB_OUTPUT
elif [[ "${{ needs.ci-test.result }}" != "success" ]]; then
echo "slack_message=There are build failures. To analyze run go <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>" >> $GITHUB_OUTPUT
echo "slack_color=#FF0000" >> $GITHUB_OUTPUT
fi
- name: Slack Notification

View File

@ -117,12 +117,15 @@ jobs:
if: always()
id: slack_notification
run: |
if [[ "${{ needs.ci-test.result }}" != "success" ]]; then
if [[ "${{ steps.test_status.outputs.run_result }}" == "failedtest" ]]; then
echo "slack_message=There are test failures in the run. Please check the <https://internal.appsmith.com/app/cypressdashboard/rundetails-64ec3df0c632e24c00764938?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}&selectiontype=test&testsstatus=failed&specsstatus=fail|Cypress dashboard> for more details." >> $GITHUB_OUTPUT
echo "slack_color=#FF0000" >> $GITHUB_OUTPUT
else
echo "slack_message=All tests passed successfully :tada: . Cypress Dashboard: <https://internal.appsmith.com/app/cypressdashboard/rundetails-64ec3df0c632e24c00764938?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}|Click here!>" >> $GITHUB_OUTPUT
elif [[ ${{ needs.ci-test.result }} == 'success' ]]; then
echo "slack_message=All tests passed successfully :tada: Cypress Dashboard: <https://internal.appsmith.com/app/cypressdashboard/rundetails-64ec3df0c632e24c00764938?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}|Click here!>" >> $GITHUB_OUTPUT
echo "slack_color=#00FF00" >> $GITHUB_OUTPUT
elif [[ "${{ needs.ci-test.result }}" != "success" ]]; then
echo "slack_message=There are build failures. To analyze run go <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>" >> $GITHUB_OUTPUT
echo "slack_color=#FF0000" >> $GITHUB_OUTPUT
fi
- name: Slack Notification