2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

[fenix] RELENG-588: Add notifications for Mozilla Online builds (https://github.com/mozilla-mobile/fenix/pull/20010)

This commit is contained in:
Ben Hearsum (he/him) 2021-06-14 14:07:02 -04:00 committed by GitHub
parent 80133db1ce
commit 2dafd2dcea
2 changed files with 31 additions and 1 deletions

View File

@ -7,6 +7,7 @@ loader: fenix_taskgraph.loader.multi_dep:loader
transforms:
- fenix_taskgraph.transforms.multi_dep:transforms
- fenix_taskgraph.transforms.signing:transforms
- fenix_taskgraph.transforms.notify:transforms
- taskgraph.transforms.task:transforms
kind-dependencies:
@ -52,3 +53,18 @@ job-template:
kind: build
platform: android-all/opt
tier: 1
notify:
by-build-type:
.*mozillaonline:
by-level:
'3':
email:
content: The Mozilla Online Fenix {version} APKs are now available
link:
text: Taskcluster Task
href: 'https://firefox-ci-tc.services.mozilla.com/tasks/${status.taskId}'
on-reasons: [completed]
subject: Mozilla Online Fenix {version} APKs are now available
to-addresses: [mozillaonline-fenix@mozilla.com]
default: {}
default: {}

View File

@ -18,7 +18,7 @@ transforms = TransformSequence()
@transforms.add
def resolve_keys(config, tasks):
for task in tasks:
for key in ("run-on-tasks-for", "signing-format"):
for key in ("run-on-tasks-for", "signing-format", "notify"):
resolve_keyed_by(
task,
key,
@ -90,3 +90,17 @@ def set_signing_format(config, tasks):
for upstream_artifact in task["worker"]["upstream-artifacts"]:
upstream_artifact["formats"] = [signing_format]
yield task
@transforms.add
def format_email(config, tasks):
version = config.params["version"]
for task in tasks:
if "notify" in task:
email = task["notify"].get("email")
if email:
email["subject"] = email["subject"].format(version=version)
email["content"] = email["content"].format(version=version)
yield task