diff --git a/taskcluster/ci/release-mark-as-shipped/kind.yml b/taskcluster/ci/release-mark-as-shipped/kind.yml index ff6c37d29705..ac2ce066e235 100644 --- a/taskcluster/ci/release-mark-as-shipped/kind.yml +++ b/taskcluster/ci/release-mark-as-shipped/kind.yml @@ -6,7 +6,7 @@ loader: taskgraph.loader.transform:loader transforms: - taskgraph.transforms.release_deps:transforms - - taskgraph.transforms.job:transforms + - taskgraph.transforms.release_mark_as_shipped:transforms - taskgraph.transforms.task:transforms kind-dependencies: @@ -17,12 +17,21 @@ kind-dependencies: job-defaults: description: mark release as shipped in Ship-It - worker-type: buildbot-bridge/buildbot-bridge + worker-type: + by-project: + mozilla-central: scriptworker-prov-v1/shipit-v1 + mozilla-beta: scriptworker-prov-v1/shipit-v1 + mozilla-release: scriptworker-prov-v1/shipit-v1 + default: scriptworker-prov-v1/shipit-dev + worker: + implementation: shipit + scopes: + by-project: + mozilla-beta: ['project:releng:ship-it:production'] + mozilla-release: ['project:releng:ship-it:production'] + default: ['project:releng:ship-it:staging'] run-on-projects: [] shipping-phase: ship - run: - using: buildbot - release-promotion: true index: type: release notifications: @@ -74,24 +83,15 @@ jobs: fennec: name: release-fennec_mark_as_shipped shipping-product: fennec - run: - product: fennec - buildername: release-{branch}-fennec_mark_as_shipped index: product: fennec firefox: name: release-firefox_mark_as_shipped shipping-product: firefox - run: - product: firefox - buildername: release-{branch}-firefox_mark_as_shipped index: product: firefox devedition: name: release-devedition_mark_as_shipped shipping-product: devedition - run: - product: devedition - buildername: release-{branch}-devedition_mark_as_shipped index: product: devedition diff --git a/taskcluster/taskgraph/transforms/release_mark_as_shipped.py b/taskcluster/taskgraph/transforms/release_mark_as_shipped.py new file mode 100644 index 000000000000..464a0fcfccfa --- /dev/null +++ b/taskcluster/taskgraph/transforms/release_mark_as_shipped.py @@ -0,0 +1,34 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +""" +Add from parameters.yml into Balrog publishing tasks. +""" + +from __future__ import absolute_import, print_function, unicode_literals + +from taskgraph.transforms.base import TransformSequence +from taskgraph.util.schema import resolve_keyed_by +from taskgraph.util.scriptworker import get_release_config + +transforms = TransformSequence() + + +@transforms.add +def make_task_description(config, jobs): + release_config = get_release_config(config) + for job in jobs: + resolve_keyed_by( + job, 'worker-type', item_name=job['name'], project=config.params['project'] + ) + resolve_keyed_by( + job, 'scopes', item_name=job['name'], project=config.params['project'] + ) + + job['worker']['release-name'] = '{product}-{version}-build{build_number}'.format( + product=job['shipping-product'].capitalize(), + version=release_config['version'], + build_number=release_config['build_number'] + ) + + yield job diff --git a/taskcluster/taskgraph/transforms/task.py b/taskcluster/taskgraph/transforms/task.py index 0bcc888b2a64..95dbaf2c135b 100644 --- a/taskcluster/taskgraph/transforms/task.py +++ b/taskcluster/taskgraph/transforms/task.py @@ -583,6 +583,9 @@ task_description_schema = Schema({ Required('google-play-track'): Any('production', 'beta', 'alpha', 'rollout', 'invalid'), Required('commit'): bool, Optional('rollout-percentage'): Any(int, None), + }, { + Required('implementation'): 'shipit', + Required('release-name'): basestring, }), }) @@ -1066,6 +1069,15 @@ def build_push_apk_breakpoint_payload(config, task, task_def): task_def['payload'] = task['worker']['payload'] +@payload_builder('shipit') +def build_ship_it_payload(config, task, task_def): + worker = task['worker'] + + task_def['payload'] = { + 'release_name': worker['release-name'] + } + + @payload_builder('invalid') def build_invalid_payload(config, task, task_def): task_def['payload'] = 'invalid task - should never be created' diff --git a/taskcluster/taskgraph/util/workertypes.py b/taskcluster/taskgraph/util/workertypes.py index 1ebf5ccf279e..c896b620ed93 100644 --- a/taskcluster/taskgraph/util/workertypes.py +++ b/taskcluster/taskgraph/util/workertypes.py @@ -41,6 +41,8 @@ WORKER_TYPES = { 'scriptworker-prov-v1/beetmoverworker-v1': ('beetmover', None), 'scriptworker-prov-v1/pushapk-v1': ('push-apk', None), "scriptworker-prov-v1/signing-linux-v1": ('scriptworker-signing', None), + "scriptworker-prov-v1/shipit": ('shipit', None), + "scriptworker-prov-v1/shipit-dev": ('shipit', None), 'releng-hardware/gecko-t-osx-1010': ('generic-worker', 'macosx'), }