Bug 1542819: Use GCP signing workers r=mtabara a=release
authorChris AtLee <catlee@mozilla.com>
Fri, 04 Oct 2019 15:58:27 +0000
changeset 555682 48b17276d88528ca536aa422d5eabc984002b2e2
parent 555681 3febfcc28926e9752f9d13d7e63844acbea94c0e
child 555683 e19149a8ab7d79a0d66ef2d091558ef051b70a8f
push id2185
push usermtabara@mozilla.com
push dateMon, 04 Nov 2019 19:27:34 +0000
treeherdermozilla-release@e19149a8ab7d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmtabara, release
bugs1542819
milestone70.0.2
Bug 1542819: Use GCP signing workers r=mtabara a=release Differential Revision: https://phabricator.services.mozilla.com/D48199
taskcluster/ci/config.yml
taskcluster/taskgraph/transforms/geckodriver_signing.py
taskcluster/taskgraph/transforms/signing.py
--- a/taskcluster/ci/config.yml
+++ b/taskcluster/ci/config.yml
@@ -237,20 +237,20 @@ release-promotion:
             is-rc: true
             target-tasks-method: ship_desktop
             partial-updates: true
 
 scriptworker:
     # See additional configuration in taskcluster/taskgraph/util/scriptworker.py
     scope-prefix: 'project:releng'
     worker-types:
-        'linux-signing':
+        'scriptworker-k8s/gecko-3-signing':
             - 'project:releng:signing:cert:release-signing'
             - 'project:releng:signing:cert:nightly-signing'
-        'linux-depsigning':
+        'scriptworker-k8s/gecko-t-signing':
             - 'project:releng:signing:cert:dep-signing'
         'scriptworker-k8s/gecko-3-beetmover':
             - 'project:releng:beetmover:bucket:release'
             - 'project:releng:beetmover:bucket:nightly'
             - 'project:releng:beetmover:bucket:partner'
             - 'project:releng:beetmover:bucket:maven-production'
         'scriptworker-k8s/gecko-1-beetmover':
             - 'project:releng:beetmover:bucket:dep'
--- a/taskcluster/taskgraph/transforms/geckodriver_signing.py
+++ b/taskcluster/taskgraph/transforms/geckodriver_signing.py
@@ -77,22 +77,33 @@ def make_repackage_signing_description(c
             'scopes': scopes,
             'dependencies': dependencies,
             'attributes': attributes,
             'run-on-projects': dep_job.attributes.get('run_on_projects'),
             'treeherder': treeherder,
         }
 
         if build_platform.startswith('macosx'):
-            assert task['worker-type'].startswith("linux-"), \
+            worker_type = task['worker-type']
+            worker_type_alias_map = {
+                'scriptworker-k8s/gecko-t-signing': 'mac-depsigning',
+                'scriptworker-k8s/gecko-3-signing': 'mac-signing',
+                'scriptworker-k8s/gecko-t-signing-dev': 'mac-depsigning',
+                'scriptworker-k8s/gecko-3-signing-dev': 'mac-signing',
+            }
+
+            assert worker_type in worker_type_alias_map, \
                 (
-                    "Make sure to adjust the below worker-type logic for "
+                    "Make sure to adjust the below worker_type_alias logic for "
                     "mac if you change the signing workerType aliases!"
+                    " ({} not found in mapping)".format(worker_type)
                 )
-            task['worker-type'] = task['worker-type'].replace("linux-", "mac-")
+            worker_type = worker_type_alias_map[worker_type]
+
+            task['worker-type'] = worker_type_alias_map[task['worker-type']]
             task['worker']['mac-behavior'] = 'mac_geckodriver'
 
         yield task
 
 
 def _craft_upstream_artifacts(dependency_kind, build_platform):
     if build_platform.startswith('win'):
         signing_format = 'sha2signcode'
--- a/taskcluster/taskgraph/transforms/signing.py
+++ b/taskcluster/taskgraph/transforms/signing.py
@@ -171,22 +171,30 @@ def make_task_description(config, jobs):
             'run-on-projects': dep_job.attributes.get('run_on_projects'),
             'optimization': dep_job.optimization,
             'routes': job.get('routes', []),
             'shipping-product': job.get('shipping-product'),
             'shipping-phase': job.get('shipping-phase'),
         }
 
         if 'macosx' in build_platform:
-            assert worker_type_alias.startswith("linux-"), \
+            worker_type_alias_map = {
+                'scriptworker-k8s/gecko-t-signing': 'mac-depsigning',
+                'scriptworker-k8s/gecko-3-signing': 'mac-signing',
+                'scriptworker-k8s/gecko-t-signing-dev': 'mac-depsigning',
+                'scriptworker-k8s/gecko-3-signing-dev': 'mac-signing',
+            }
+
+            assert worker_type_alias in worker_type_alias_map, \
                 (
                     "Make sure to adjust the below worker_type_alias logic for "
                     "mac if you change the signing workerType aliases!"
+                    " ({} not found in mapping)".format(worker_type_alias)
                 )
-            worker_type_alias = worker_type_alias.replace("linux-", "mac-")
+            worker_type_alias = worker_type_alias_map[worker_type_alias]
             mac_behavior = evaluate_keyed_by(
                 config.graph_config['mac-notarization']['mac-behavior'],
                 'mac behavior',
                 {
                     'release-type': config.params['release_type'],
                     'platform': build_platform,
                 },
             )