[AAE-15499] QA Failure provide more context on slack notification (#8720)

* sharing data with files

* sharing data with files

* disable check

* add shell

* skip step

* skip step

* fix tab

* run e2e

* failing e2e

* failing e2e make fail

* failing e2e make fail

* use js action

* fix template

* test action

* fix

* fix test

* fix test

* use action

* use action fix

* use action fix

* use action fix

* use action fix

* use action fix

* use action fix

* use action fix

* use action fix

* Normal run

* verify slack groups

* verify slack groups

* verify slack groups

* verify slack groups

* refactor

* remove useless code

* remove useless code

* use space as separator

* use space as separator

* use ga channel

* append only for cron

* run e2e job only if affected

* simulate process

* fix logic

* fix logic

* fix output

* almost done
This commit is contained in:
Maurizio Vitale
2023-06-29 16:27:10 +01:00
committed by GitHub
parent e3ea23da37
commit 0fa61a2893
7 changed files with 281 additions and 25 deletions

View File

@@ -488,6 +488,20 @@ jobs:
name: Final Results
needs: [check-if-pr-is-approved, check-package-lock, setup, unit-tests, lint, build-libs, e2e, e2e-storybook]
steps:
- uses: actions/checkout@v3
- name: Log e2e result
id: e2e-result
if: ${{ github.event_name == 'schedule' }}
uses: ./.github/actions/artifact-extract
with:
artifact-name: global-e2e-result
file-name: e2e-failures.txt
- name: identify-slack-group
id: groups
if: ${{ github.event_name == 'schedule' }}
uses: ./.github/actions/slack-group-area
with:
affected: ${{ steps.e2e-result.outputs.result }}
- uses: slackapi/slack-github-action@v1.23.0
name: Nofify QA failure
if: ${{ github.event_name == 'schedule' && contains(needs.*.result, 'failure') }}
@@ -495,7 +509,7 @@ jobs:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel-id: 'C016SMNNL8L' #guild-channel
slack-message: "🔴 Warning: The daily ADF cronjob failed\nWorkflow run : <https://github.com/Alfresco/alfresco-ng2-components/actions/runs/${{ github.run_id }}| here>\n"
slack-message: "🔴 Warning: The daily ADF cronjob failed\nWorkflow run : <https://github.com/Alfresco/alfresco-ng2-components/actions/runs/${{ github.run_id }}| here>\nDetails: ${{ steps.e2e-result.outputs.result }}\nArea: ${{ steps.groups.outputs.groups}}"
- name: workflow failure
run: exit 1
if: ${{ contains(needs.*.result, 'failure') }}