Bug 1535487 - determine rootUrl directly in buglist creator r=tomprince
authorDustin J. Mitchell <dustin@mozilla.com>
Fri, 15 Mar 2019 15:09:45 +0000
changeset 464397 d3b2d866bd72
parent 464396 9a96eceffaee
child 464398 de3d7088cbc5
push id35716
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:42:17 +0000
treeherdermozilla-central@8ee97c045359 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstomprince
bugs1535487
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 1535487 - determine rootUrl directly in buglist creator r=tomprince Differential Revision: https://phabricator.services.mozilla.com/D23601
python/mozrelease/mozrelease/buglist_creator.py
--- a/python/mozrelease/mozrelease/buglist_creator.py
+++ b/python/mozrelease/mozrelease/buglist_creator.py
@@ -6,17 +6,16 @@
 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}'
@@ -213,17 +212,21 @@ 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)
 
-    use_proxy = 'TASKCLUSTER_PROXY_URL' in os.environ
-    notify_options = optionsFromEnvironment({'rootUrl': get_root_url(use_proxy)})
+    # use proxy if configured, otherwise local credentials from env vars
+    if 'TASKCLUSTER_PROXY_URL' in os.environ:
+        notify_options = {'rootUrl': os.environ['TASKCLUSTER_PROXY_URL']}
+    else:
+        notify_options = optionsFromEnvironment()
+
     notify = Notify(notify_options)
     for address in addresses:
         notify.email({
             'address': address,
             'subject': subject,
             'content': content,
         })