-
Notifications
You must be signed in to change notification settings - Fork 16
73 lines (71 loc) · 2.78 KB
/
continuous-deployment.yml
File metadata and controls
73 lines (71 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Continuous deployment
run-name: Continuous deployment of ${{ github.ref_name }} to QA and Test
on:
push:
branches: [next]
jobs:
test:
permissions:
contents: write
id-token: write
uses: ./.github/workflows/test.yml
deploy:
strategy:
fail-fast: false
matrix:
environment: [qa, test]
permissions:
id-token: write
uses: ./.github/workflows/deploy.yml
with:
environment: ${{ matrix.environment }}
server_types: all
run_pre_deploy_migrations: false
end-to-end-tests:
needs: [deploy]
uses: ./.github/workflows/call-end-to-end-tests.yml
secrets: inherit
with:
cross_service_tests: true
endpoint: https://qa.mavistesting.com
github_ref: main
slack-notification:
needs: [deploy, test, end-to-end-tests]
runs-on: ubuntu-latest
permissions: {}
if: ${{ !cancelled() }}
steps:
- name: Send Slack notification about failed deployment
if: needs.test.result == 'failure' || needs.deploy.result == 'failure'
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95
with:
webhook: ${{ secrets.SLACK_MAVIS_TECH_WEBHOOK_URL }}
webhook-type: incoming-webhook
errors: true
# yamllint disable rule:line-length
payload: |
text: ":rotating_light: Continuous Deployment failed :rotating_light:"
blocks:
- type: "section"
text:
type: "mrkdwn"
text: ":rotating_light: *Continuous Deployment failed* :rotating_light:\nPull request merged by: <https://github.com/${{ github.actor }}|${{ github.actor }}>\n\n \
<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow run>"
# yamllint enable rule:line-length
- name: Send Slack notification about failed E2E tests
if: needs.end-to-end-tests.result == 'failure'
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95
with:
webhook: ${{ secrets.SLACK_MAVIS_TECH_WEBHOOK_URL }}
webhook-type: incoming-webhook
errors: true
# yamllint disable rule:line-length
payload: |
text: ":rotating_light: E2E tests failed on next :rotating_light:"
blocks:
- type: "section"
text:
type: "mrkdwn"
text: ":rotating_light: *E2E tests failed on next* :rotating_light:\nPull request merged by: <https://github.com/${{ github.actor }}|${{ github.actor }}>\n\n \
<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow run>"
# yamllint enable rule:line-length