File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353 with :
5454 services : api-e2e
5555
56- - name : Wait for api-e2e
56+ - name : Wait for api-e2e service to be ready
5757 run : |
5858 set -euo pipefail
5959 # Builder only runs kubectl set image; wait for the new revision before health.
7373 AUTH0_API_E2E_CLIENT_ID : ${{ secrets.AUTH0_API_E2E_CLIENT_ID }}
7474 AUTH0_API_E2E_CLIENT_SECRET : ${{ secrets.AUTH0_API_E2E_CLIENT_SECRET }}
7575 run : bash .github/scripts/public-api-e2e-tests.sh
76+
77+ - name : Notify Slack on failure
78+ if : failure()
79+ env :
80+ CDP_ALERTS_SLACK_WEBHOOK_URL : ${{ secrets.CDP_ALERTS_SLACK_WEBHOOK_URL }}
81+ RUN_URL : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
82+ EVENT_NAME : ${{ github.event_name }}
83+ run : |
84+ set -euo pipefail
85+ payload="$(jq -n \
86+ --arg run_url "$RUN_URL" \
87+ --arg event "$EVENT_NAME" \
88+ '{
89+ blocks: [
90+ {
91+ type: "header",
92+ text: {
93+ type: "plain_text",
94+ text: ":rotating_light: Public API e2e tests failed",
95+ emoji: true
96+ }
97+ },
98+ {
99+ type: "section",
100+ text: {
101+ type: "mrkdwn",
102+ text: ("*Workflow:* `API e2e tests`\n*Event:* `" + $event + "`\n*Run:* <" + $run_url + "|View run>")
103+ }
104+ }
105+ ]
106+ }')"
107+ curl -fsS -X POST "$CDP_ALERTS_SLACK_WEBHOOK_URL" \
108+ -H 'Content-Type: application/json' \
109+ -d "$payload"
You can’t perform that action at this time.
0 commit comments