Skip to content

Commit 0ee2b36

Browse files
committed
Bug 2042596: submit nightly metadata to ship it r=taskgraph-reviewers,releng-reviewers,ahal
Tested in https://firefox-ci-tc.services.mozilla.com/tasks/KOnU0oqbS2O8fYTUJuDhNg; depends on mozilla-releng/scriptworker-scripts#1449 being deployed. Differential Revision: https://phabricator.services.mozilla.com/D304523
1 parent 5ca4315 commit 0ee2b36

3 files changed

Lines changed: 85 additions & 0 deletions

File tree

taskcluster/docs/kinds.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,3 +982,7 @@ Run Macrobenchmark for Android on Firebase TestLab.
982982
instrumented-build-macrobenchmark-apk
983983
-------------------------------------
984984
Generate instrumented apks used to run Macrobenchmark for Android apps.
985+
986+
submit-nightly-release-metadata
987+
-------------------------------
988+
Submits metadata (product, channel, version, buildid, locales) about Nightly releases to Ship It.

taskcluster/gecko_taskgraph/transforms/task.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import datetime
1212
import functools
1313
import hashlib
14+
import json
1415
import os
1516
import re
1617
import time
@@ -1329,6 +1330,14 @@ class ShipitMaybeReleaseSchema(Schema, forbid_unknown_fields=False, kw_only=True
13291330
phase: str
13301331

13311332

1333+
class ShipitNightlyMetadataSchema(Schema, forbid_unknown_fields=True, kw_only=True):
1334+
product: str
1335+
channel: str
1336+
version: str
1337+
buildid: str
1338+
locales_file: str
1339+
1340+
13321341
class PushAddonsSchema(Schema, forbid_unknown_fields=False, kw_only=True):
13331342
channel: Literal["listed", "unlisted"]
13341343
upstream_artifacts: list[_UpstreamArtifactSchema]
@@ -1428,6 +1437,19 @@ def build_ship_it_maybe_release_payload(config, task, task_def):
14281437
}
14291438

14301439

1440+
@payload_builder("shipit-nightly-metadata", schema=ShipitNightlyMetadataSchema)
1441+
def build_ship_it_nightly_metadata_payload(_, task, task_def):
1442+
locales_file = task["worker"].get("locales-file")
1443+
locales = list(json.loads(open(locales_file).read()).keys())
1444+
task_def["payload"] = {
1445+
"product": task["worker"]["product"],
1446+
"channel": task["worker"]["channel"],
1447+
"version": task["worker"]["version"],
1448+
"buildid": task["worker"]["buildid"],
1449+
"locales": locales,
1450+
}
1451+
1452+
14311453
@payload_builder("push-addons", schema=PushAddonsSchema)
14321454
def build_push_addons_payload(config, task, task_def):
14331455
worker = task["worker"]
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This Source Code Form is subject to the terms of the Mozilla Public
2+
# License, v. 2.0. If a copy of the MPL was not distributed with this
3+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+
---
5+
loader: taskgraph.loader.transform:loader
6+
7+
transforms:
8+
- taskgraph.transforms.task_context
9+
- gecko_taskgraph.transforms.release:run_on_releases
10+
- gecko_taskgraph.transforms.task:transforms
11+
12+
task-defaults:
13+
run-on-repo-type: [hg]
14+
description: Submit nightly release metadata to ship it
15+
attributes:
16+
shippable: true
17+
task-context:
18+
from-parameters:
19+
moz_build_date: moz_build_date
20+
project: project
21+
version: version
22+
from-custom:
23+
- release-level
24+
substitution-fields:
25+
- scopes
26+
- worker
27+
- worker.locales-file
28+
worker-type: shipit
29+
worker:
30+
implementation: shipit-nightly-metadata
31+
scopes:
32+
by-release-level:
33+
production:
34+
- project:releng:ship-it:server:production
35+
- project:releng:ship-it:action:create-new-nightly-release
36+
staging:
37+
- project:releng:ship-it:server:staging
38+
- project:releng:ship-it:action:create-new-nightly-release
39+
shipping-phase: ship
40+
treeherder:
41+
symbol: Rel(metadata)
42+
kind: other
43+
tier: 1
44+
45+
tasks:
46+
firefox:
47+
run-on-releases: ["nightly"]
48+
shipping-product: firefox
49+
treeherder:
50+
platform: firefox-release/opt
51+
worker:
52+
product: firefox
53+
channel: nightly
54+
buildid: "{moz_build_date}"
55+
version: "{version}"
56+
locales-file:
57+
by-project:
58+
try: browser/locales/l10n-onchange-changesets.json
59+
default: browser/locales/l10n-changesets.json

0 commit comments

Comments
 (0)