Bug 1204490 - Add link to treeherder to taskcluster task descriptions r?dustin draft
authorWilliam Lachance <wlachance@mozilla.com>
Fri, 13 Jan 2017 15:46:43 -0500
changeset 463239 d8c9dd9a2470990a0d16c01040f63cf65c552908
parent 460673 de67fccc4c64a49f261aea29141357b94c7b3b9c
child 542617 5914e8c074261cd5e1ae90f682377fbbbc84247f
push id42001
push userwlachance@mozilla.com
push dateWed, 18 Jan 2017 19:18:05 +0000
reviewersdustin
bugs1204490
milestone53.0a1
Bug 1204490 - Add link to treeherder to taskcluster task descriptions r?dustin MozReview-Commit-ID: BDDPf0nZRRg
taskcluster/taskgraph/transforms/task.py
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -636,16 +636,23 @@ def build_task(config, tasks):
                     config.params['head_repository'],
                     config.params['head_rev'],
                     config.path),
             },
             'extra': extra,
             'tags': {'createdForUser': config.params['owner']},
         }
 
+        if task_th:
+            # link back to treeherder in description
+            th_push_link = 'https://treeherder.mozilla.org/#/jobs?repo={}&revision={}'.format(
+                config.params['project'], config.params['head_rev'])
+            task_def['metadata']['description'] += ' ([Treeherder push]({}))'.format(
+                th_push_link)
+
         # add the payload and adjust anything else as required (e.g., scopes)
         payload_builders[task['worker']['implementation']](config, task, task_def)
 
         attributes = task.get('attributes', {})
         attributes['run_on_projects'] = task.get('run-on-projects', ['all'])
 
         yield {
             'label': task['label'],