Bug 1508381 - update buglist_creator to use new version of tc client r=tomprince
authorDustin J. Mitchell <dustin@mozilla.com>
Tue, 12 Mar 2019 20:40:10 +0000
changeset 521726 a0881eefea64
parent 521725 81c183207343
child 521727 e57c2f2ddeff
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstomprince
bugs1508381
milestone67.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 1508381 - update buglist_creator to use new version of tc client r=tomprince Differential Revision: https://phabricator.services.mozilla.com/D18117
python/mozrelease/mozrelease/buglist_creator.py
--- a/python/mozrelease/mozrelease/buglist_creator.py
+++ b/python/mozrelease/mozrelease/buglist_creator.py
@@ -5,16 +5,18 @@
 
 from __future__ import absolute_import, print_function
 
 import logging
 import os
 import re
 import requests
 from taskcluster.notify import Notify
+from taskcluster import optionsFromEnvironment
+from taskgraph.util.taskcluster import get_root_url
 from operator import itemgetter
 
 from mozilla_version.gecko import GeckoVersion
 
 BUGLIST_TEMPLATE = '* [Bugs since previous changeset]({url})\n'
 BACKOUT_REGEX = re.compile(r'back(\s?)out|backed out|backing out', re.IGNORECASE)
 BACKOUT_TEMPLATE = '* [Backouts since previous changeset]({url})\n'
 BUGZILLA_BUGLIST_TEMPLATE = 'https://bugzilla.mozilla.org/buglist.cgi?bug_id={bugs}'
@@ -211,20 +213,18 @@ Task group: [{task_group_id}](https://to
     subject_prefix = ""
     if product in {"fennec"}:
         subject_prefix = "[mobile] "
     if product in {"firefox", "devedition"}:
         subject_prefix = "[desktop] "
 
     subject = '{} Build of {} {} build {}'.format(subject_prefix, product, version, build_number)
 
-    notify_options = {}
+    notify_options = optionsFromEnvironment({'rootUrl': get_root_url()})
     if 'TASKCLUSTER_PROXY_URL' in os.environ:
-        # Until bug 1460015 is finished, use the old baseUrl style of proxy URL
-        base_url = os.environ['TASKCLUSTER_PROXY_URL'].rstrip('/')
-        notify_options['baseUrl'] = '{}/notify/v1'.format(base_url)
+        notify_options['rootUrl'] = os.environ['TASKCLUSTER_PROXY_URL']
     notify = Notify(notify_options)
     for address in addresses:
         notify.email({
             'address': address,
             'subject': subject,
             'content': content,
         })