forked from mirrors/gecko-dev
Bug 1827709: Notify Thunderbird CI Matrix channel after mozilla-central push. r=releng-reviewers,gabriel
This notification will help Thunderbird developers who are tasked with pushing multiple bugs to comm-central after a mozilla-central push. Taskgraph tests adjusted to verify the notification is only sent for pushes to mozilla-central, and to run the tests when .taskcluster.yml is updated. Differential Revision: https://phabricator.services.mozilla.com/D175290
This commit is contained in:
parent
08686a9936
commit
bd5c5ef653
3 changed files with 44 additions and 11 deletions
|
|
@ -131,7 +131,11 @@ tasks:
|
||||||
# Send a notification email if the push comes from try
|
# Send a notification email if the push comes from try
|
||||||
- $if: 'repository.project == "try"'
|
- $if: 'repository.project == "try"'
|
||||||
then:
|
then:
|
||||||
"notify.email.${ownerEmail}.on-completed"
|
- "notify.email.${ownerEmail}.on-completed"
|
||||||
|
- $if: 'repository.project == "mozilla-central"'
|
||||||
|
then:
|
||||||
|
# Notify #thunderbird-ci
|
||||||
|
- "notify.matrix-room.!TWztIhgqLawNpRBZTC:mozilla.org.on-completed"
|
||||||
else:
|
else:
|
||||||
$if: 'tasks_for == "action"'
|
$if: 'tasks_for == "action"'
|
||||||
then:
|
then:
|
||||||
|
|
@ -310,13 +314,16 @@ tasks:
|
||||||
- $if: 'tasks_for == "hg-push"'
|
- $if: 'tasks_for == "hg-push"'
|
||||||
then:
|
then:
|
||||||
notify:
|
notify:
|
||||||
email:
|
$merge:
|
||||||
$merge:
|
- email:
|
||||||
- link:
|
$merge:
|
||||||
text: "Treeherder Jobs"
|
- link:
|
||||||
href: "https://treeherder.mozilla.org/#/jobs?repo=${repository.project}&revision=${push.revision}"
|
text: "Treeherder Jobs"
|
||||||
# Email for try pushes should thank you for your revision
|
href: "https://treeherder.mozilla.org/#/jobs?repo=${repository.project}&revision=${push.revision}"
|
||||||
- $if: 'repository.project == "try"'
|
- $if: 'repository.project == "try"'
|
||||||
then:
|
then:
|
||||||
subject: "Thank you for your try submission of ${push.revision}. It's the best!"
|
subject: "Thank you for your try submission of ${push.revision}. It's the best!"
|
||||||
content: "Your try push has been submitted. It's the best! Use the link to view the status of your jobs."
|
content: "Your try push has been submitted. It's the best! Use the link to view the status of your jobs."
|
||||||
|
- $if: 'repository.project == "mozilla-central"'
|
||||||
|
then:
|
||||||
|
matrixBody: "${repository.project} push notification: https://treeherder.mozilla.org/#/jobs?repo=${repository.project}&revision=${push.revision}"
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ firefox-ci:
|
||||||
subsuite: ci
|
subsuite: ci
|
||||||
when:
|
when:
|
||||||
files-changed:
|
files-changed:
|
||||||
|
- '.taskcluster.yml'
|
||||||
- 'taskcluster/ci/**'
|
- 'taskcluster/ci/**'
|
||||||
- 'taskcluster/**/*.py'
|
- 'taskcluster/**/*.py'
|
||||||
- 'tools/tryselect/selectors/auto.py'
|
- 'tools/tryselect/selectors/auto.py'
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,31 @@ class TestTaskclusterYml(unittest.TestCase):
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
rendered["tasks"][0]["metadata"]["name"], "Gecko Decision Task"
|
rendered["tasks"][0]["metadata"]["name"], "Gecko Decision Task"
|
||||||
)
|
)
|
||||||
|
self.assertIn("matrixBody", rendered["tasks"][0]["extra"]["notify"])
|
||||||
|
|
||||||
|
def test_push_non_mc(self):
|
||||||
|
context = {
|
||||||
|
"tasks_for": "hg-push",
|
||||||
|
"push": {
|
||||||
|
"revision": "e8d2d9aff5026ef1f1777b781b47fdcbdb9d8f20",
|
||||||
|
"base_revision": "e8aebe488b2f2e567940577de25013d00e818f7c",
|
||||||
|
"owner": "dustin@mozilla.com",
|
||||||
|
"pushlog_id": 1556565286,
|
||||||
|
"pushdate": 112957,
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"url": "https://hg.mozilla.org/releases/mozilla-beta",
|
||||||
|
"project": "mozilla-beta",
|
||||||
|
"level": "3",
|
||||||
|
},
|
||||||
|
"ownTaskId": slugid.nice(),
|
||||||
|
}
|
||||||
|
rendered = jsone.render(self.taskcluster_yml, context)
|
||||||
|
pprint.pprint(rendered)
|
||||||
|
self.assertEqual(
|
||||||
|
rendered["tasks"][0]["metadata"]["name"], "Gecko Decision Task"
|
||||||
|
)
|
||||||
|
self.assertNotIn("matrixBody", rendered["tasks"][0]["extra"]["notify"])
|
||||||
|
|
||||||
def test_cron(self):
|
def test_cron(self):
|
||||||
context = {
|
context = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue