Bug 1538995 - adjust repackage-signing jobs to sign partner stub installers, r=aki
authorNick Thomas <nthomas@mozilla.com>
Thu, 20 Jun 2019 22:18:05 +0000
changeset 537290 75411b55c8fcd7693efca7ec46b8776329f86d34
parent 537289 8000d797a95c551bad9b4fa333df186c9fc8e212
child 537291 19d9e73e3c0e31be437c032c4b6d0d1bb8101959
push id2128
push usernthomas@mozilla.com
push dateWed, 14 Aug 2019 02:49:25 +0000
treeherdermozilla-release@2254823049a2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaki
bugs1538995
milestone68.0.2
Bug 1538995 - adjust repackage-signing jobs to sign partner stub installers, r=aki Differential Revision: https://phabricator.services.mozilla.com/D34948
taskcluster/taskgraph/transforms/repackage_signing_partner.py
--- a/taskcluster/taskgraph/transforms/repackage_signing_partner.py
+++ b/taskcluster/taskgraph/transforms/repackage_signing_partner.py
@@ -5,17 +5,17 @@
 Transform the repackage signing task into an actual task description.
 """
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 from taskgraph.loader.single_dep import schema
 from taskgraph.transforms.base import TransformSequence
 from taskgraph.util.attributes import copy_attributes_from_dependent_job
-from taskgraph.util.partners import check_if_partners_enabled
+from taskgraph.util.partners import check_if_partners_enabled, get_partner_config_by_kind
 from taskgraph.util.scriptworker import (
     add_scope_prefix,
     get_signing_cert_scope_per_platform,
     get_worker_type_for_scope,
 )
 from taskgraph.util.taskcluster import get_artifact_path
 from taskgraph.transforms.task import task_description_schema
 from voluptuous import Required, Optional
@@ -79,16 +79,31 @@ def make_repackage_signing_description(c
                 "taskId": {"task-reference": "<repackage>"},
                 "taskType": "repackage",
                 "paths": [
                     get_artifact_path(dep_job, "{}/target.installer.exe".format(repack_id)),
                 ],
                 "formats": ["sha2signcode", "autograph_gpg"]
             }]
             scopes.append(add_scope_prefix(config, "signing:format:sha2signcode"))
+
+            partner_config = get_partner_config_by_kind(config, config.kind)
+            partner, subpartner, _ = repack_id.split('/')
+            repack_stub_installer = partner_config[partner][subpartner].get(
+                'repack_stub_installer')
+            if build_platform.startswith('win32') and repack_stub_installer:
+                upstream_artifacts.append({
+                    "taskId": {"task-reference": "<repackage>"},
+                    "taskType": "repackage",
+                    "paths": [
+                        get_artifact_path(dep_job, "{}/target.stub-installer.exe".format(
+                            repack_id)),
+                    ],
+                    "formats": ["sha2signcode", "autograph_gpg"]
+                })
         elif 'mac' in build_platform:
             upstream_artifacts = [{
                 "taskId": {"task-reference": "<repackage>"},
                 "taskType": "repackage",
                 "paths": [
                     get_artifact_path(dep_job, "{}/target.dmg".format(repack_id)),
                 ],
                 "formats": ["autograph_gpg"]