Bug 1639065 - show comm repo revision in Thunderbird release-notify-started emails. r=darktrojan DONTBUILD
This is a copy of the transform from mozilla-central. The only change is to pass comm_head_rev and comm_head_repository instead of the mozilla repo information. Differential Revision: https://phabricator.services.mozilla.com/D79408 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b61e0a289b
Коммит
d948089641
|
@ -6,7 +6,7 @@ loader: taskgraph.loader.transform:loader
|
|||
|
||||
transforms:
|
||||
- taskgraph.transforms.release_deps:transforms
|
||||
- taskgraph.transforms.release_started:transforms
|
||||
- comm_taskgraph.transforms.release_started:transforms
|
||||
- taskgraph.transforms.job:transforms
|
||||
- taskgraph.transforms.task:transforms
|
||||
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
# 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 notifications via taskcluster-notify for release tasks
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
from pipes import quote as shell_quote
|
||||
|
||||
from taskgraph.transforms.base import TransformSequence
|
||||
from taskgraph.util.schema import resolve_keyed_by
|
||||
|
||||
|
||||
transforms = TransformSequence()
|
||||
|
||||
|
||||
@transforms.add
|
||||
def add_notifications(config, jobs):
|
||||
for job in jobs:
|
||||
label = '{}-{}'.format(config.kind, job['name'])
|
||||
|
||||
resolve_keyed_by(job, 'emails', label, project=config.params['project'])
|
||||
emails = [email.format(config=config.__dict__) for email in job.pop('emails')]
|
||||
|
||||
command = [
|
||||
'release',
|
||||
'send-buglist-email',
|
||||
'--version', config.params['version'],
|
||||
'--product', job['shipping-product'],
|
||||
'--revision', config.params['comm_head_rev'],
|
||||
'--build-number', str(config.params['build_number']),
|
||||
'--repo', config.params['comm_head_repository'],
|
||||
]
|
||||
for address in emails:
|
||||
command += ['--address', address]
|
||||
command += [
|
||||
# We wrap this in `{'task-reference': ...}` below
|
||||
'--task-group-id', '<decision>',
|
||||
]
|
||||
|
||||
job['scopes'] = ['notify:email:{}'.format(address) for address in emails]
|
||||
job['run'] = {
|
||||
'using': 'mach',
|
||||
'sparse-profile': 'mach',
|
||||
'mach': {'task-reference': ' '.join(map(shell_quote, command))},
|
||||
}
|
||||
|
||||
yield job
|
Загрузка…
Ссылка в новой задаче