2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-17 15:26:23 +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: transforms:
- fenix_taskgraph.transforms.multi_dep:transforms - fenix_taskgraph.transforms.multi_dep:transforms
- fenix_taskgraph.transforms.signing:transforms - fenix_taskgraph.transforms.signing:transforms
- fenix_taskgraph.transforms.notify:transforms
- taskgraph.transforms.task:transforms - taskgraph.transforms.task:transforms
kind-dependencies: kind-dependencies:
@ -52,3 +53,18 @@ job-template:
kind: build kind: build
platform: android-all/opt platform: android-all/opt
tier: 1 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 @transforms.add
def resolve_keys(config, tasks): def resolve_keys(config, tasks):
for task in 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( resolve_keyed_by(
task, task,
key, key,
@ -90,3 +90,17 @@ def set_signing_format(config, tasks):
for upstream_artifact in task["worker"]["upstream-artifacts"]: for upstream_artifact in task["worker"]["upstream-artifacts"]:
upstream_artifact["formats"] = [signing_format] upstream_artifact["formats"] = [signing_format]
yield task 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