Bug 1538995 - adjust beetmover to copy partner stub installers into candidates dir, r=aki
authorNick Thomas <nthomas@mozilla.com>
Thu, 20 Jun 2019 22:18:27 +0000
changeset 537291 19d9e73e3c0e31be437c032c4b6d0d1bb8101959
parent 537290 75411b55c8fcd7693efca7ec46b8776329f86d34
child 537292 86fac3055d1042916b24e3efb436505c75ad31fd
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 beetmover to copy partner stub installers into candidates dir, r=aki Appends the customized stub installer and it's gpg signature to the list of artifacts to beetmove to candidates. Differential Revision: https://phabricator.services.mozilla.com/D34950
taskcluster/taskgraph/transforms/beetmover_repackage_partner.py
--- a/taskcluster/taskgraph/transforms/beetmover_repackage_partner.py
+++ b/taskcluster/taskgraph/transforms/beetmover_repackage_partner.py
@@ -159,17 +159,17 @@ def split_public_and_private(config, job
             # private
             yield populate_scopes_and_worker_type(
                 config, job, partner_bucket_scope, partner_public=False
             )
 
 
 def generate_upstream_artifacts(job, build_task_ref, repackage_task_ref,
                                 repackage_signing_task_ref, platform, repack_id,
-                                partner_path):
+                                partner_path, repack_stub_installer=False):
 
     upstream_artifacts = []
     artifact_prefix = get_artifact_prefix(job)
 
     if "linux" in platform:
         upstream_artifacts.append({
             "taskId": {"task-reference": build_task_ref},
             "taskType": "build",
@@ -203,29 +203,45 @@ def generate_upstream_artifacts(job, bui
             "locale": partner_path,
         })
         upstream_artifacts.append({
             "taskId": {"task-reference": repackage_signing_task_ref},
             "taskType": "repackage",
             "paths": ["{}/{}/target.installer.exe.asc".format(artifact_prefix, repack_id)],
             "locale": partner_path,
         })
+        if platform.startswith('win32') and repack_stub_installer:
+            upstream_artifacts.append({
+                "taskId": {"task-reference": repackage_signing_task_ref},
+                "taskType": "repackage",
+                "paths": ["{}/{}/target.stub-installer.exe".format(artifact_prefix, repack_id)],
+                "locale": partner_path,
+            })
+            upstream_artifacts.append({
+                "taskId": {"task-reference": repackage_signing_task_ref},
+                "taskType": "repackage",
+                "paths": ["{}/{}/target.stub-installer.exe.asc".format(
+                    artifact_prefix, repack_id)],
+                "locale": partner_path,
+            })
 
     if not upstream_artifacts:
         raise Exception("Couldn't find any upstream artifacts.")
 
     return upstream_artifacts
 
 
 @transforms.add
 def make_task_worker(config, jobs):
     for job in jobs:
         platform = job["attributes"]["build_platform"]
         repack_id = job["extra"]["repack_id"]
         partner, subpartner, locale = job['extra']['repack_id'].split('/')
+        partner_config = get_partner_config_by_kind(config, config.kind)
+        repack_stub_installer = partner_config[partner][subpartner].get('repack_stub_installer')
         build_task = None
         repackage_task = None
         repackage_signing_task = None
 
         for dependency in job["dependencies"].keys():
             if 'repackage-signing' in dependency:
                 repackage_signing_task = dependency
             elif 'repackage' in dependency:
@@ -263,15 +279,15 @@ def make_task_worker(config, jobs):
         del(job['partner-bucket-scope'])
 
         worker = {
             'implementation': 'beetmover',
             'release-properties': craft_release_properties(config, job),
             'upstream-artifacts': generate_upstream_artifacts(
                 job, build_task_ref, repackage_task_ref,
                 repackage_signing_task_ref, platform, repack_id,
-                partner_path
+                partner_path, repack_stub_installer
             ),
             'partner-public': partner_public,
         }
         job["worker"] = worker
 
         yield job