Bug 1253871 - L10N repacks should use martools from en-US build, not from latest dir r=jlund a=release
authorRail Aliiev <rail@mozilla.com>
Wed, 09 Mar 2016 20:58:05 -0500
changeset 338857 8867739057e6113c84357469243a1a0752ec14ce
parent 338856 3120bbed5ff0725cb227d9874afc5f74b2d69691
child 342494 352f811d9d688898c9076b1d2d5fc20b85e58309
push id12588
push userbmo:rail@mozilla.com
push dateThu, 10 Mar 2016 01:58:26 +0000
reviewersjlund, release
bugs1253871
milestone46.0
Bug 1253871 - L10N repacks should use martools from en-US build, not from latest dir r=jlund a=release MozReview-Commit-ID: AScWLP9nqwn
testing/mozharness/configs/single_locale/mozilla-beta.py
testing/mozharness/scripts/desktop_l10n.py
--- a/testing/mozharness/configs/single_locale/mozilla-beta.py
+++ b/testing/mozharness/configs/single_locale/mozilla-beta.py
@@ -3,20 +3,16 @@ config = {
     "branch": "mozilla-beta",
     "en_us_binary_url": "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-beta/",
     "update_channel": "beta",
     "latest_mar_dir": '/pub/mozilla.org/firefox/nightly/latest-mozilla-beta-l10n',
 
     # l10n
     "hg_l10n_base": "https://hg.mozilla.org/releases/l10n/mozilla-beta",
 
-    # mar
-    # No nightly on beta, using aurora mar tools
-    "mar_tools_url": "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/mar-tools/%(platform)s",
-
     # repositories
     "mozilla_dir": "mozilla-beta",
     "repos": [{
         "vcs": "hg",
         "repo": "https://hg.mozilla.org/build/tools",
         "revision": "default",
         "dest": "tools",
     }, {
--- a/testing/mozharness/scripts/desktop_l10n.py
+++ b/testing/mozharness/scripts/desktop_l10n.py
@@ -66,17 +66,17 @@ configuration_tokens = ('branch',
                         'ssh_key_dir',
                         'stage_product',
                         )
 # some other values such as "%(version)s", "%(buildid)s", ...
 # are defined at run time and they cannot be enforced in the _pre_config_lock
 # phase
 runtime_config_tokens = ('buildid', 'version', 'locale', 'from_buildid',
                          'abs_objdir', 'abs_merge_dir', 'version',
-                         'to_buildid', 'en_us_binary_url')
+                         'to_buildid', 'en_us_binary_url', 'mar_tools_url')
 
 
 # DesktopSingleLocale {{{1
 class DesktopSingleLocale(LocalesMixin, ReleaseMixin, MockMixin, BuildbotMixin,
                           VCSMixin, SigningMixin, PurgeMixin, BaseScript,
                           BalrogMixin, MarMixin, VirtualenvMixin, TransferMixin):
     """Manages desktop repacks"""
     config_options = [[
@@ -253,16 +253,26 @@ class DesktopSingleLocale(LocalesMixin, 
         unknown_tokens = set(tokens_left) - set(runtime_config_tokens)
         if unknown_tokens:
             msg = ['unknown tokens in configuration:']
             for t in unknown_tokens:
                 msg.append(t)
             self.fatal(' '.join(msg))
         self.info('configuration looks ok')
 
+        self.read_buildbot_config()
+        if not self.buildbot_config:
+            self.warning("Skipping buildbot properties overrides")
+            return
+        props = self.buildbot_config["properties"]
+        for prop in ['mar_tools_url']:
+            if props.get(prop):
+                self.info("Overriding %s with %s" % (prop, props[prop]))
+                self.config[prop] = props.get(prop)
+
     def _get_configuration_tokens(self, iterable):
         """gets a list of tokens in iterable"""
         regex = re.compile('%\(\w+\)s')
         results = []
         try:
             for element in iterable:
                 if isinstance(iterable, str):
                     # this is a string, look for tokens