From 92b0f666f80dfda5963278dce304407d710763ac Mon Sep 17 00:00:00 2001 From: Johan Lorenzo Date: Fri, 2 Mar 2018 15:20:50 +0100 Subject: [PATCH] Bug 1432219 - part 3: Fix bad beetmover worker type in production r=bhearsum --HG-- extra : source : dbe9214d56355abb026839a145a0580068f75e33 extra : amend_source : 9d8077e6f71c5e322548870206b6aa6a0ccb8345 --- .../ci/release-generate-checksums-beetmover/kind.yml | 6 ++++++ .../transforms/release_generate_checksums_beetmover.py | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/taskcluster/ci/release-generate-checksums-beetmover/kind.yml b/taskcluster/ci/release-generate-checksums-beetmover/kind.yml index c25c7dd6179c..61c50109d616 100644 --- a/taskcluster/ci/release-generate-checksums-beetmover/kind.yml +++ b/taskcluster/ci/release-generate-checksums-beetmover/kind.yml @@ -14,3 +14,9 @@ kind-dependencies: job-template: shipping-phase: promote + worker-type: + by-project: + mozilla-central: scriptworker-prov-v1/beetmoverworker-v1 + mozilla-beta: scriptworker-prov-v1/beetmoverworker-v1 + mozilla-release: scriptworker-prov-v1/beetmoverworker-v1 + default: scriptworker-prov-v1/beetmoverworker-dev diff --git a/taskcluster/taskgraph/transforms/release_generate_checksums_beetmover.py b/taskcluster/taskgraph/transforms/release_generate_checksums_beetmover.py index 62c1d705b714..5a9d3eb6cfea 100644 --- a/taskcluster/taskgraph/transforms/release_generate_checksums_beetmover.py +++ b/taskcluster/taskgraph/transforms/release_generate_checksums_beetmover.py @@ -8,7 +8,7 @@ from __future__ import absolute_import, print_function, unicode_literals from taskgraph.transforms.base import TransformSequence from taskgraph.util.attributes import copy_attributes_from_dependent_job -from taskgraph.util.schema import validate_schema, Schema +from taskgraph.util.schema import validate_schema, Schema, resolve_keyed_by, optionally_keyed_by from taskgraph.util.scriptworker import (get_beetmover_bucket_scope, get_beetmover_action_scope, get_phase) @@ -54,6 +54,7 @@ release_generate_checksums_beetmover_schema = Schema({ Optional('shipping-phase'): task_description_schema['shipping-phase'], Optional('shipping-product'): task_description_schema['shipping-product'], + Required('worker-type'): optionally_keyed_by('project', basestring), }) @@ -102,10 +103,14 @@ def make_task_description(config, jobs): action_scope = get_beetmover_action_scope(config) phase = get_phase(config) + resolve_keyed_by( + job, 'worker-type', item_name=label, project=config.params['project'] + ) + task = { 'label': label, 'description': description, - 'worker-type': 'scriptworker-prov-v1/beetmoverworker-dev', + 'worker-type': job['worker-type'], 'scopes': [bucket_scope, action_scope], 'dependencies': dependencies, 'attributes': attributes,