mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 05:39:41 +02:00
Makes most kinds that reference nightly attribute reference the shippable attribute. Also makes most transforms that use nightly use shippable Transfers dependencies/ownership for some things to shippable from nightly where it was harder to support both. In no particular order, full list: Send shippable attribute down to dep tasks. Set tests as shippable attribute Add new signing routes Add shippable routes to repackage_routes transform Adjust target tasks Add shippable nightly-l10n Add nightly-signing and as a side affect add repackage and repackage-signing Add support for proper balrog platforms for shippable Add shippable to the nightly sccache guard Fix TC_PLATFORM_PER_FTP in partners.py to use shippable Add shippable to mozharness_test variants Only actually used for android which doesn't have shippable at this time. Add shippable variant to beetmover transforms Do nightly signing for mars on shippable Support shippable in partner-repack transform Support shippable in amo langpacks transform Use proper signing for shippable tasks in repackage transforms Set upload symbols to use shippable too Use shippable as deps for geckodriver extraction Use shippable as dep for autograph-stage signing Do not run beetmover-l10n for shippable Run shippable style jobs for repackage signing Set build_platform for update verify and uvc to be shippable Run repackage-msi for shippable Add shippable to osx partner repack signing add shippable to emefree repackage add shippable to emefree repackage signing add shippable to beetmover checksums Add shippable to partner repack repackage signing add partner repack beetmover Add shippable to mar signing Add shippable to mar-signing-l10n add shippable to eme free beetmover checksums Add shippable to upload-generated-sources Add beetmover langpacks to shippable Add repackage-l10n to shippable Add shippable to partner repack chunk-dummy Do eme free builds with shippable Add signing of language packs to shippable Add snap repackage for shippable Add shippable for release-eme-free repack signing Add partials for shippable Add partner repack repackage for shippable Add emefree beetmover for shippable Add checksums-signing to shippable Switch partner repacks to shippable Add shippable to beetmover-repackage Add secondary update verify configs for shippable secondary update verify for shippable Differential Revision: https://phabricator.services.mozilla.com/D24699 --HG-- extra : moz-landing-system : lando
98 lines
4.2 KiB
Python
98 lines
4.2 KiB
Python
# 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/.
|
|
"""
|
|
Transform the upload-symbols task description template,
|
|
taskcluster/ci/upload-symbols/job-template.yml into an actual task description.
|
|
"""
|
|
|
|
from __future__ import absolute_import, print_function, unicode_literals
|
|
|
|
from taskgraph.transforms.base import TransformSequence
|
|
from taskgraph.util.attributes import RELEASE_PROJECTS
|
|
from taskgraph.util.treeherder import join_symbol
|
|
|
|
import logging
|
|
logger = logging.getLogger(__name__)
|
|
|
|
transforms = TransformSequence()
|
|
|
|
|
|
@transforms.add
|
|
def check_nightlies(config, tasks):
|
|
"""Ensure that we upload symbols for all nightly builds, so that crash-stats can
|
|
resolve any reports sent to it. Try may enable full symbols but not upload them.
|
|
|
|
Putting this check here (instead of the transforms for the build kind) lets us
|
|
leverage the any not-for-build-platforms set in the update-symbols kind."""
|
|
for task in tasks:
|
|
dep = task['primary-dependency']
|
|
if config.params['project'] in RELEASE_PROJECTS and \
|
|
dep.attributes.get('nightly', dep.attributes.get('shippable')) and \
|
|
not dep.attributes.get('enable-full-crashsymbols'):
|
|
raise Exception('Nightly job %s should have enable-full-crashsymbols attribute '
|
|
'set to true to enable symbol upload to crash-stats' % dep.label)
|
|
yield task
|
|
|
|
|
|
@transforms.add
|
|
def fill_template(config, tasks):
|
|
for task in tasks:
|
|
dep = task['primary-dependency']
|
|
|
|
# Fill out the dynamic fields in the task description
|
|
task['label'] = dep.label + '-upload-symbols'
|
|
|
|
# Skip tasks where we don't have the full crashsymbols enabled
|
|
if not dep.attributes.get('enable-full-crashsymbols'):
|
|
logger.debug("Skipping upload symbols task for %s", task['label'])
|
|
continue
|
|
|
|
task['dependencies'] = {'build': dep.label}
|
|
task['worker']['env']['GECKO_HEAD_REPOSITORY'] = config.params['head_repository']
|
|
task['worker']['env']['GECKO_HEAD_REV'] = config.params['head_rev']
|
|
task['worker']['env']['SYMBOL_SECRET'] = task['worker']['env']['SYMBOL_SECRET'].format(
|
|
level=config.params['level'])
|
|
|
|
build_platform = dep.attributes.get('build_platform')
|
|
build_type = dep.attributes.get('build_type')
|
|
attributes = task.setdefault('attributes', {})
|
|
attributes['build_platform'] = build_platform
|
|
attributes['build_type'] = build_type
|
|
if dep.attributes.get('nightly'):
|
|
attributes['nightly'] = True
|
|
if dep.attributes.get('shippable'):
|
|
attributes['shippable'] = True
|
|
|
|
treeherder = task.get('treeherder', {})
|
|
th = dep.task.get('extra')['treeherder']
|
|
th_platform = dep.task['extra'].get('treeherder-platform',
|
|
"{}/{}".format(th['machine']['platform'], build_type))
|
|
th_symbol = th.get('symbol')
|
|
th_groupsymbol = th.get('groupSymbol', '?')
|
|
treeherder.setdefault('platform', th_platform)
|
|
treeherder.setdefault('tier', th['tier'])
|
|
treeherder.setdefault('kind', th['jobKind'])
|
|
|
|
# Disambiguate the treeherder symbol.
|
|
sym = 'Sym' + (th_symbol[1:] if th_symbol.startswith('B') else th_symbol)
|
|
treeherder.setdefault(
|
|
'symbol', join_symbol(th_groupsymbol, sym)
|
|
)
|
|
task['treeherder'] = treeherder
|
|
|
|
if dep.attributes.get('nightly'):
|
|
# For nightly builds, we want to run these tasks if the build is run.
|
|
task['run-on-projects'] = dep.attributes.get('run_on_projects')
|
|
elif dep.attributes.get('shippable'):
|
|
# For shippable builds, we want to run these tasks if the build is run.
|
|
# XXX Better to run this on promote phase instead?
|
|
task['run-on-projects'] = dep.attributes.get('run_on_projects')
|
|
else:
|
|
# For other builds, these can be requested to upload to the try symbol sever.
|
|
task['run-on-projects'] = ['try']
|
|
|
|
# clear out the stuff that's not part of a task description
|
|
del task['primary-dependency']
|
|
|
|
yield task
|