Bug 1453033 - Define taskgraph logic for signing and shipping devedition language packs as well. r=aki
authorJustin Wood <Callek@gmail.com>
Wed, 02 May 2018 14:20:32 -0400
changeset 472858 b6836abf3cb00990b47d49fd36fce289dee65264
parent 472857 64cc95e2a434c8d279e3a3d6ac593b1f7fa698c8
child 472859 ecd12b33bb11877c2248df44b4872706f7221dda
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaki
bugs1453033
milestone61.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 1453033 - Define taskgraph logic for signing and shipping devedition language packs as well. r=aki This merely extends the logic involved in shipping language packs to AMO. All devedition language packs will be shipped as 'unlisted' for now, meaning that there is no extra AMO work involved. The extension ID is taken from the langpack itself. Differential Revision: https://phabricator.services.mozilla.com/D1104
taskcluster/ci/release-sign-and-push-langpacks/kind.yml
taskcluster/taskgraph/transforms/beetmover_repackage.py
taskcluster/taskgraph/transforms/release_beetmover_signed_addons.py
taskcluster/taskgraph/transforms/release_sign_and_push_langpacks.py
--- a/taskcluster/ci/release-sign-and-push-langpacks/kind.yml
+++ b/taskcluster/ci/release-sign-and-push-langpacks/kind.yml
@@ -11,18 +11,19 @@ transforms:
 
 kind-dependencies:
    - build
    - nightly-l10n
 
 
 only-for-build-platforms:
    - linux64-nightly/opt    # addons.mozilla.org only support 1 platform per locale. That's why we use linux64
+   - linux64-devedition-nightly/opt
    - macosx64-nightly/opt   # Although, we need the special locale "ja-JP-Mac" from this platform
-   # TODO Activate devedition
+   - macosx64-devedition-nightly/opt
 
 
 job-template:
    description: Signs {locales} XPIs for platform via addons.mozilla.org and pushes them
    worker-type:
       by-project:
          mozilla-beta: scriptworker-prov-v1/addon-v1
          mozilla-release: scriptworker-prov-v1/addon-v1
--- a/taskcluster/taskgraph/transforms/beetmover_repackage.py
+++ b/taskcluster/taskgraph/transforms/beetmover_repackage.py
@@ -58,52 +58,33 @@ logger = logging.getLogger(__name__)
     "mozharness.zip",
 ]
 
 # Until bug 1331141 is fixed, if you are adding any new artifacts here that
 # need to be transfered to S3, please be aware you also need to follow-up
 # with a beetmover patch in https://github.com/mozilla-releng/beetmoverscript/.
 # See example in bug 1348286
 UPSTREAM_ARTIFACT_UNSIGNED_PATHS = {
-    r'^(linux(|64)|macosx64)-nightly$':
+    r'^(linux(|64)|macosx64)(|-devedition)-nightly$':
         _DESKTOP_UPSTREAM_ARTIFACTS_UNSIGNED_EN_US + [
             'host/bin/mar',
             'host/bin/mbsdiff',
         ],
-    r'^(linux(|64)|macosx64)-devedition-nightly$':
-        _DESKTOP_UPSTREAM_ARTIFACTS_UNSIGNED_EN_US + [
-            'host/bin/mar',
-            'host/bin/mbsdiff',
-            # TODO Bug 1453033: Sign devedition langpacks
-            'target.langpack.xpi',
-        ],
     r'^linux64-asan-reporter-nightly$':
         filter(lambda a: a not in ('target.crashreporter-symbols.zip', 'target.jsshell.zip'),
                _DESKTOP_UPSTREAM_ARTIFACTS_UNSIGNED_EN_US + [
                     "host/bin/mar",
                     "host/bin/mbsdiff",
                 ]),
-    r'^win(32|64)-nightly$':
+    r'^win(32|64)(|-devedition)-nightly$':
         _DESKTOP_UPSTREAM_ARTIFACTS_UNSIGNED_EN_US + [
             'host/bin/mar.exe',
             'host/bin/mbsdiff.exe',
         ],
-    r'^win(32|64)-devedition-nightly$':
-        _DESKTOP_UPSTREAM_ARTIFACTS_UNSIGNED_EN_US + [
-            'host/bin/mar.exe',
-            'host/bin/mbsdiff.exe',
-            # TODO Bug 1453033: Sign devedition langpacks
-            'target.langpack.xpi',
-        ],
-    r'^(linux(|64)|macosx64|win(32|64))-nightly-l10n$': [],
-    r'^(linux(|64)|macosx64|win(32|64))-devedition-nightly-l10n$':
-        [
-            # TODO Bug 1453033: Sign devedition langpacks
-            'target.langpack.xpi',
-        ],
+    r'^(linux(|64)|macosx64|win(32|64))(|-devedition)-nightly-l10n$': [],
 }
 
 # Until bug 1331141 is fixed, if you are adding any new artifacts here that
 # need to be transfered to S3, please be aware you also need to follow-up
 # with a beetmover patch in https://github.com/mozilla-releng/beetmoverscript/.
 # See example in bug 1348286
 UPSTREAM_ARTIFACT_SIGNED_PATHS = {
     r'^linux(|64)(|-devedition|-asan-reporter)-nightly(|-l10n)$':
--- a/taskcluster/taskgraph/transforms/release_beetmover_signed_addons.py
+++ b/taskcluster/taskgraph/transforms/release_beetmover_signed_addons.py
@@ -166,19 +166,23 @@ def strip_unused_data(config, jobs):
 def yield_all_platform_jobs(config, jobs):
     # Even though langpacks are now platform independent, we keep beetmoving them at old
     # platform-specific locations. That's why this transform exist
     for job in jobs:
         if 'ja-JP-mac' in job['label']:
             # This locale must not be copied on any other platform than macos
             yield job
         else:
-            for platform in ('linux', 'linux64', 'macosx64', 'win32', 'win64'):
+            platforms = ('linux', 'linux64', 'macosx64', 'win32', 'win64')
+            if 'devedition' in job['attributes']['build_platform']:
+                platforms = ('{}-devedition'.format(plat) for plat in platforms)
+            for platform in platforms:
                 platform_job = copy.deepcopy(job)
-                if 'ja' in platform_job['attributes']['chunk_locales'] and platform == 'macosx64':
+                if 'ja' in platform_job['attributes']['chunk_locales'] and \
+                        platform in ('macosx64', 'macosx64-devedition'):
                     platform_job = _strip_ja_data_from_linux_job(platform_job)
 
                 platform_job = _change_platform_data(platform_job, platform)
 
                 yield platform_job
 
 
 def _strip_ja_data_from_linux_job(platform_job):
@@ -192,17 +196,20 @@ def _strip_ja_data_from_linux_job(platfo
         for artifact in platform_job['worker']['upstream-artifacts']
         if artifact['locale'] != 'ja'
     ]
 
     return platform_job
 
 
 def _change_platform_data(platform_job, platform):
+    orig_platform = 'linux64'
+    if 'devedition' in platform:
+        orig_platform = 'linux64-devedition'
     platform_job['attributes']['build_platform'] = platform
-    platform_job['label'] = platform_job['label'].replace('linux64', platform)
-    platform_job['description'] = platform_job['description'].replace('linux64', platform)
+    platform_job['label'] = platform_job['label'].replace(orig_platform, platform)
+    platform_job['description'] = platform_job['description'].replace(orig_platform, platform)
     platform_job['treeherder']['platform'] = platform_job['treeherder']['platform'].replace(
-        'linux64', platform
+        orig_platform, platform
     )
     platform_job['worker']['release-properties']['platform'] = platform
 
     return platform_job
--- a/taskcluster/taskgraph/transforms/release_sign_and_push_langpacks.py
+++ b/taskcluster/taskgraph/transforms/release_sign_and_push_langpacks.py
@@ -85,19 +85,19 @@ def copy_attributes(config, jobs):
         yield job
 
 
 @transforms.add
 def filter_out_macos_jobs_but_mac_only_locales(config, jobs):
     for job in jobs:
         build_platform = job['dependent-task'].attributes.get('build_platform')
 
-        if build_platform == 'linux64-nightly':
+        if build_platform in ('linux64-nightly', 'linux64-devedition-nightly'):
             yield job
-        elif build_platform == 'macosx64-nightly' and \
+        elif build_platform in ('macosx64-nightly', 'macosx64-devedition-nightly') and \
                 'ja-JP-mac' in job['attributes']['chunk_locales']:
             # Other locales of the same job shouldn't be processed
             job['attributes']['chunk_locales'] = ['ja-JP-mac']
             job['label'] = job['label'].replace(
                 job['attributes']['l10n_chunk'], 'ja-JP-mac'
             )
             yield job