Bug 1566298 - Followup, don't look for en-US langpacks in an 'en-US/' path. r=jlorenzo
authorJustin Wood <Callek@gmail.com>
Wed, 28 Aug 2019 17:18:14 +0000
changeset 554195 9df802613d63389a92c3ce5131d5db672742889a
parent 554194 fa71c787eec9b6c66ba1ab2c767e8144f0535260
child 554196 ab9a80002a622370a028ae0243a1a27cf71f923b
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlorenzo
bugs1566298
milestone70.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 1566298 - Followup, don't look for en-US langpacks in an 'en-US/' path. r=jlorenzo Sign language packs via Autograph instead of AMO. Differential Revision: https://phabricator.services.mozilla.com/D43595
taskcluster/taskgraph/transforms/release_beetmover_signed_addons.py
--- a/taskcluster/taskgraph/transforms/release_beetmover_signed_addons.py
+++ b/taskcluster/taskgraph/transforms/release_beetmover_signed_addons.py
@@ -131,23 +131,32 @@ def make_task_worker(config, jobs):
         if should_use_artifact_map(platform):
             job['worker']['artifact-map'] = generate_beetmover_artifact_map(
                 config, job, platform=platform, locale=locale)
 
         yield job
 
 
 def generate_upstream_artifacts(upstream_task_ref, locales):
+    def locale_path(locale): return ''
+    if locales and locales != ['en-US']:
+        def locale_path(locale): return '{}/'.format(locale)
+        # We assume 'en-US' is not in locales, assert it here
+        assert 'en-US' not in locales, "Expected no en-US in: {}".format(locales)
+    else:
+        # We assume only 'en-US' is in locales, assert it here
+        assert 'en-US' in locales, "Expect en-US in: {}".format(locales)
+        assert len(locales) == 1, "Expect locales to only contain en-US"
+
     return [{
         'taskId': {'task-reference': upstream_task_ref},
         'taskType': 'scriptworker',
         'locale': locale,
         'paths': [
-            # addonscript uploads en-US XPI in the en-US folder
-            'public/build/{}/target.langpack.xpi'.format(locale)
+            'public/build/{}target.langpack.xpi'.format(locale_path(locale))
         ],
     } for locale in locales]
 
 
 @transforms.add
 def strip_unused_data(config, jobs):
     for job in jobs:
         del job['primary-dependency']