Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit 1299836

Browse files
author
Rebecca Graber
authored
feat: schedule triggering of provisioning tests and alert OpsGenie on failure (#843)
* feat: schedule triggering of provisioning tests and alert OpsGenie on failure
1 parent f0dd31a commit 1299836

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/provisioning-tests.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
pull_request:
99
branches:
1010
- '**'
11+
schedule:
12+
# run at 7:30 am M-F
13+
- cron: '30 11 * * 1-5'
1114

1215
jobs:
1316

@@ -66,5 +69,31 @@ jobs:
6669
- name: dev.check
6770
run: make dev.check.${{matrix.services}}
6871

72+
- name: notify on failure
73+
if: ${{ failure() && github.ref == 'refs/heads/master' }}
74+
uses: dawidd6/action-send-mail@v3
75+
with:
76+
server_address: email-smtp.us-east-1.amazonaws.com
77+
server_port: 465
78+
username: ${{secrets.EDX_SMTP_USERNAME}}
79+
password: ${{secrets.EDX_SMTP_PASSWORD}}
80+
subject: 'Failure: Devstack provisioning tests for ${{matrix.services}} #${{github.run_id}}'
81+
to: devstack-provisioning-tests@edx.opsgenie.net
82+
from: github-actions <github-actions@edx.org>
83+
body: 'Devstack provisioning tests in ${{github.repository}} for ${{matrix.services}} failed! For details see "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}". \n Runbook url: https://openedx.atlassian.net/l/c/zoEcLk2z .'
84+
85+
- name: close alerts on success
86+
if: ${{ !failure() && github.ref == 'refs/heads/master' }}
87+
uses: dawidd6/action-send-mail@v3
88+
with:
89+
server_address: email-smtp.us-east-1.amazonaws.com
90+
server_port: 465
91+
username: ${{secrets.EDX_SMTP_USERNAME}}
92+
password: ${{secrets.EDX_SMTP_PASSWORD}}
93+
subject: 'Back to normal: Devstack provisioning tests for ${{matrix.services}} #${{github.run_id}}'
94+
to: devstack-provisioning-tests@edx.opsgenie.net
95+
from: github-actions <github-actions@edx.org>
96+
body: Devstack provisioning tests in ${{github.repository}} are back to normal for ${{matrix.services}}
97+
6998
- name: docs
7099
run: make docs

0 commit comments

Comments
 (0)