From 132a0c2e25c30fade152ac2a89ddb550e0e5ef30 Mon Sep 17 00:00:00 2001
From: Saroj <43822041+sarojsarab@users.noreply.github.com>
Date: Mon, 21 Aug 2023 17:23:20 +0530
Subject: [PATCH] ci: Update ce push workflow to use dime defenders (#26527)
## Description
- Update ce push workflow to use dime defenders
#### Type of change
- Workflow changes
## Testing
>
#### How Has This Been Tested?
- [ ] Workflow run
>
>
---
.github/workflows/test-build-docker-image.yml | 40 ++++++++++++++++++-
1 file changed, 39 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/test-build-docker-image.yml b/.github/workflows/test-build-docker-image.yml
index 8cbf41b223..8d409d0ce1 100644
--- a/.github/workflows/test-build-docker-image.yml
+++ b/.github/workflows/test-build-docker-image.yml
@@ -60,7 +60,7 @@ jobs:
# Only run if the build step is successful
if: success()
name: ci-test
- uses: ./.github/workflows/ci-test.yml
+ uses: ./.github/workflows/ci-test-custom-script.yml
secrets: inherit
with:
pr: 0
@@ -102,6 +102,44 @@ jobs:
rm -f ~/combined_failed_spec_ci
cat ~/failed_spec_ci/failed_spec_ci* >> ~/combined_failed_spec_ci
+ - name: CI test failures
+ if: needs.ci-test.result != 'success'
+ shell: bash
+ run: |
+ new_failed_spec_env="
$(sort -u ~/combined_failed_spec_ci | sed 's/|cypress|cypress/\n/g' | sed 's/^/- /')
"
+ echo "$new_failed_spec_env"
+ echo "new_failed_spec_env<> $GITHUB_ENV
+ echo "$new_failed_spec_env" >> $GITHUB_ENV
+ echo "EOF" >> $GITHUB_ENV
+
+ - name: Generate slack message
+ continue-on-error: true
+ if: always()
+ id: slack_notification
+ run: |
+ if [[ "${{ needs.ci-test.result }}" != "success" ]]; then
+ echo "slack_message=There are test failures in the run.
${{env.new_failed_spec_env}}
Please check the <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Github Actions> for more details." >> $GITHUB_OUTPUT
+ echo "slack_color=#FF0000" >> $GITHUB_OUTPUT
+ else
+ echo "slack_message=All tests passed successfully :tada: . Github Action: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Click here!>" >> $GITHUB_OUTPUT
+ echo "slack_color=#00FF00" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Slack Notification
+ continue-on-error: true
+ if: always()
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_CHANNEL: cypresspushworkflow
+ SLACK_COLOR: ${{steps.slack_notification.outputs.slack_color}}
+ SLACK_ICON: https://app.slack.com/services/B05D17E4QVB
+ SLACK_TITLE: 'Result:'
+ SLACK_USERNAME: Cypress Push Workflows
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_HOSTED }}
+ MSG_MINIMAL: Ref,Event,Commit
+ SLACK_FOOTER: 'Appsmith Push Workflows'
+ SLACK_MESSAGE: ${{steps.slack_notification.outputs.slack_message}}
+
# Force save the CI failed spec list into a cache
- name: Store the combined run result for CI
if: needs.ci-test.result != 'success'