Bug 1490515: add "on-completed" notify route to try push decision tasks r=tomprince
authorConnor Sheehan <sheehan@mozilla.com>
Mon, 24 Sep 2018 13:46:55 +0000
changeset 437909 863ee0115b822dc8a8a8dca6cac3e2e481f0da0f
parent 437908 1c366e594aebfa832090d289208c47356857663f
child 437910 bdc24dded5656cf650d9cac7d6e4e43fd214d58c
push id108190
push usershindli@mozilla.com
push dateMon, 24 Sep 2018 16:51:13 +0000
treeherdermozilla-inbound@bf90894b0f2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstomprince
bugs1490515
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1490515: add "on-completed" notify route to try push decision tasks r=tomprince Buildbot had a feature where a notification email would be sent to the user who triggered the build jobs once Buildbot had begun processing the request. Since we have migrated off Buildbot, we have lost this much-appreciated functionality. Taskcluster allows us to send emails when a task fails, raises an exception or completes successfully. We already send notification emails out for the first two cases, sending an email on completion of the Gecko decision task would essentially replicate the Buildbot functionality. This commit adds the "on-completed" notification route when the repository project alias corresponds to a known try repo. In that case, we also add data to the `extra.notification.email` section which creates a link to the Treeherder view for the scheduled jobs. Differential Revision: https://phabricator.services.mozilla.com/D6253
.taskcluster.yml
--- a/.taskcluster.yml
+++ b/.taskcluster.yml
@@ -72,16 +72,20 @@ tasks:
             - "tc-treeherder.v2.${repository.project}.${push.revision}.${_pushId}"
             - $if: 'tasks_for == "hg-push"'
               then:
                 - "index.gecko.v2.${repository.project}.latest.taskgraph.decision"
                 - "index.gecko.v2.${repository.project}.revision.${push.revision}.taskgraph.decision"
                 - "index.gecko.v2.${repository.project}.pushlog-id.${_pushId}.decision"
                 - "notify.email.${ownerEmail}.on-failed"
                 - "notify.email.${ownerEmail}.on-exception"
+                # Send a notification email if the push comes from try
+                - $if: 'repository.project == "try"'
+                  then:
+                    "notify.email.${ownerEmail}.on-completed"
                 # These are the old index routes for the decision task.
                 # They are still here so external tools that referenced them continue to work.
                 - "index.gecko.v2.${repository.project}.latest.firefox.decision"
                 - "index.gecko.v2.${repository.project}.revision.${push.revision}.firefox.decision"
               else:
                 $if: 'tasks_for == "action"'
                 then:
                 - "notify.email.taskcluster-notifications+action-task@mozilla.com.on-failed"
@@ -224,8 +228,19 @@ tasks:
                     taskGroupId: '${action.taskGroupId}'
                     taskId: {$eval: 'taskId'}
                     input: {$eval: 'input'}
                     parameters: {$eval: 'parameters'}
             - $if: 'tasks_for == "cron"'
               then:
                 cron: {$json: {$eval: 'cron'}}
             - tasks_for: '${tasks_for}'
+            # Email format for try pushes
+            - $if: 'tasks_for == "hg-push" && repository.project == "try"'
+              then:
+                notify:
+                  email:
+                    subject: "Thank you for your try submission of ${push.revision}. It's the best!"
+                    content: "Your try push has been submitted. Use the link to view the status of your jobs."
+                    link:
+                      text: "Treeherder Jobs"
+                      href: "https://treeherder.mozilla.org/#/jobs?repo=${repository.project}&revision=${push.revision}"
+