diff --git a/taskcluster/ci/config.yml b/taskcluster/ci/config.yml index a265538db540b..cb0945c9bbca6 100755 --- a/taskcluster/ci/config.yml +++ b/taskcluster/ci/config.yml @@ -77,6 +77,7 @@ treeherder: 'pub': 'APK publishing' 'p': 'Partial generation' 'ps': 'Partials signing' + 'ms': 'Complete MAR signing' 'Rel': 'Release promotion' 'Snap': 'Snap image generation' 'langpack': 'Langpack sigatures and uploads' diff --git a/taskcluster/ci/mar-signing-l10n/kind.yml b/taskcluster/ci/mar-signing-l10n/kind.yml new file mode 100644 index 0000000000000..f158aadb970e3 --- /dev/null +++ b/taskcluster/ci/mar-signing-l10n/kind.yml @@ -0,0 +1,31 @@ +# 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/. + +loader: taskgraph.loader.single_dep:loader + +transforms: + - taskgraph.transforms.name_sanity:transforms + - taskgraph.transforms.mar_signing:transforms + - taskgraph.transforms.task:transforms + +kind-dependencies: + - repackage-l10n + +only-for-build-platforms: + - linux-nightly/opt + - linux-devedition-nightly/opt + - linux64-nightly/opt + - linux64-devedition-nightly/opt + - linux64-asan-reporter-nightly/opt + - macosx64-nightly/opt + - macosx64-devedition-nightly/opt + - win32-nightly/opt + - win32-devedition-nightly/opt + - win64-nightly/opt + - win64-devedition-nightly/opt + +job-template: + shipping-phase: promote + treeherder-group: ms + description-suffix: 'mar signing' diff --git a/taskcluster/ci/mar-signing/kind.yml b/taskcluster/ci/mar-signing/kind.yml new file mode 100644 index 0000000000000..fb9b0fd2b30bc --- /dev/null +++ b/taskcluster/ci/mar-signing/kind.yml @@ -0,0 +1,33 @@ +# 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/. + +loader: taskgraph.loader.single_dep:loader + +transforms: + - taskgraph.transforms.name_sanity:transforms + - taskgraph.transforms.mar_signing:transforms + - taskgraph.transforms.task:transforms + +kind-dependencies: + - repackage + +only-for-build-platforms: + - linux-nightly/opt + - linux-devedition-nightly/opt + - linux64-nightly/opt + - linux64-devedition-nightly/opt + - linux64-asan-reporter-nightly/opt + - macosx64-nightly/opt + - macosx64-devedition-nightly/opt + - win32-nightly/opt + - win32-devedition-nightly/opt + - win64-nightly/opt + - win64-devedition-nightly/opt + - linux64-asan-reporter-nightly/opt + - win64-asan-reporter-nightly/opt + +job-template: + shipping-phase: promote + treeherder-group: ms + description-suffix: 'mar signing' diff --git a/taskcluster/ci/partials-signing/kind.yml b/taskcluster/ci/partials-signing/kind.yml index 92dd80d91cabb..082a755ad9bbc 100644 --- a/taskcluster/ci/partials-signing/kind.yml +++ b/taskcluster/ci/partials-signing/kind.yml @@ -6,7 +6,7 @@ loader: taskgraph.loader.single_dep:loader transforms: - taskgraph.transforms.name_sanity:transforms - - taskgraph.transforms.partials_signing:transforms + - taskgraph.transforms.mar_signing:transforms - taskgraph.transforms.task:transforms kind-dependencies: @@ -14,3 +14,5 @@ kind-dependencies: job-template: shipping-phase: promote + treeherder-group: ps + description-suffix: 'partial signing' diff --git a/taskcluster/docs/kinds.rst b/taskcluster/docs/kinds.rst index bc2371594deae..6d0499e1e8849 100644 --- a/taskcluster/docs/kinds.rst +++ b/taskcluster/docs/kinds.rst @@ -448,13 +448,19 @@ Repackage-L10n is a ```Repackage``` task split up to be suitable for use after l repackage-signing ----------------- -Repackage-signing take the repackaged installers (windows) and update packaging (with -the signed internal bits) and signs them. +Repackage-signing take the repackaged installers (windows) and signs them. repackage-signing-l10n ---------------------- -Repackage-signing take the repackaged installers (windows) and update packaging (with -the signed internal bits) and signs them for localized versions. +Repackage-signing-l10n take the repackaged installers (windows) and signs them for localized versions. + +mar-signing +----------- +Mar-signing takes the complete update MARs and signs them. + +mar-signing-l10n +---------------- +Mar-signing-l10n takes the complete update MARs and signs them for localized versions. repackage-msi ------------- diff --git a/taskcluster/taskgraph/transforms/partials_signing.py b/taskcluster/taskgraph/transforms/mar_signing.py similarity index 75% rename from taskcluster/taskgraph/transforms/partials_signing.py rename to taskcluster/taskgraph/transforms/mar_signing.py index 204d5534cfa4b..d5a0c383550fc 100644 --- a/taskcluster/taskgraph/transforms/partials_signing.py +++ b/taskcluster/taskgraph/transforms/mar_signing.py @@ -2,7 +2,7 @@ # 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/. """ -Transform the partials task into an actual task description. +Transform the {partials,mar}-signing task into an actual task description. """ from __future__ import absolute_import, print_function, unicode_literals @@ -14,6 +14,7 @@ ) from taskgraph.util.partials import get_balrog_platform_name, get_partials_artifacts from taskgraph.util.taskcluster import get_artifact_prefix +from taskgraph.util.treeherder import join_symbol import logging logger = logging.getLogger(__name__) @@ -21,7 +22,7 @@ transforms = TransformSequence() -def generate_upstream_artifacts(job, release_history, platform, locale=None): +def generate_partials_artifacts(job, release_history, platform, locale=None): artifact_prefix = get_artifact_prefix(job) if locale: artifact_prefix = '{}/{}'.format(artifact_prefix, locale) @@ -62,17 +63,38 @@ def generate_upstream_artifacts(job, release_history, platform, locale=None): return upstream_artifacts +def generate_complete_artifacts(job, platform, locale=None): + artifact_prefix = get_artifact_prefix(job) + if locale: + artifact_prefix = '{}/{}'.format(artifact_prefix, locale) + + upstream_artifacts = [{ + "taskId": {"task-reference": '<{}>'.format(job.kind)}, + "taskType": 'build', + "paths": [ + "{}/target.complete.mar".format(artifact_prefix) + ], + "formats": ["autograph_hash_only_mar384"], + }] + + return upstream_artifacts + + @transforms.add def make_task_description(config, jobs): for job in jobs: dep_job = job['primary-dependency'] + locale = dep_job.attributes.get('locale') treeherder = job.get('treeherder', {}) - treeherder.setdefault('symbol', 'ps(N)') + treeherder['symbol'] = join_symbol( + job.get('treeherder-group', 'ms'), + locale or 'N' + ) dep_th_platform = dep_job.task.get('extra', {}).get( 'treeherder', {}).get('machine', {}).get('platform', '') - label = job.get('label', "partials-signing-{}".format(dep_job.label)) + label = job.get('label', "{}-{}".format(config.kind, dep_job.label)) dep_th_platform = dep_job.task.get('extra', {}).get( 'treeherder', {}).get('machine', {}).get('platform', '') treeherder.setdefault('platform', @@ -88,14 +110,17 @@ def make_task_description(config, jobs): dependencies.update(signing_dependencies) attributes = copy_attributes_from_dependent_job(dep_job) - locale = dep_job.attributes.get('locale') + attributes['shipping_phase'] = job['shipping-phase'] if locale: attributes['locale'] = locale - treeherder['symbol'] = 'ps({})'.format(locale) balrog_platform = get_balrog_platform_name(dep_th_platform) - upstream_artifacts = generate_upstream_artifacts( - dep_job, config.params['release_history'], balrog_platform, locale) + if config.kind == 'partials-signing': + upstream_artifacts = generate_partials_artifacts( + dep_job, config.params['release_history'], balrog_platform, locale) + else: + upstream_artifacts = generate_complete_artifacts( + dep_job, balrog_platform, locale) build_platform = dep_job.attributes.get('build_platform') is_nightly = dep_job.attributes.get('nightly') @@ -109,8 +134,8 @@ def make_task_description(config, jobs): task = { 'label': label, - 'description': "{} Partials".format( - dep_job.task["metadata"]["description"]), + 'description': "{} {}".format( + dep_job.task["metadata"]["description"], job['description-suffix']), 'worker-type': get_worker_type_for_scope(config, signing_cert_scope), 'worker': {'implementation': 'scriptworker-signing', 'upstream-artifacts': upstream_artifacts,