2016-09-29 21:59:49 +03:00
|
|
|
# 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/.
|
|
|
|
"""
|
|
|
|
Do transforms specific to l10n kind
|
|
|
|
"""
|
|
|
|
|
|
|
|
from __future__ import absolute_import, print_function, unicode_literals
|
|
|
|
|
2016-12-13 19:06:48 +03:00
|
|
|
import copy
|
2017-02-17 17:57:11 +03:00
|
|
|
import json
|
2016-12-13 19:06:48 +03:00
|
|
|
|
|
|
|
from mozbuild.chunkify import chunkify
|
2018-10-25 01:16:49 +03:00
|
|
|
from taskgraph.loader.multi_dep import schema
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
from taskgraph.transforms.base import (
|
|
|
|
TransformSequence,
|
2017-02-01 03:30:52 +03:00
|
|
|
)
|
|
|
|
from taskgraph.util.schema import (
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
optionally_keyed_by,
|
2017-02-01 03:30:52 +03:00
|
|
|
resolve_keyed_by,
|
2018-09-25 23:26:55 +03:00
|
|
|
taskref_or_string,
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
)
|
2018-05-23 01:22:37 +03:00
|
|
|
from taskgraph.util.attributes import copy_attributes_from_dependent_job
|
2018-03-13 22:13:51 +03:00
|
|
|
from taskgraph.util.taskcluster import get_artifact_prefix
|
2018-05-15 22:00:18 +03:00
|
|
|
from taskgraph.util.treeherder import add_suffix
|
2017-03-22 19:48:40 +03:00
|
|
|
from taskgraph.transforms.job import job_description_schema
|
2017-12-06 06:24:25 +03:00
|
|
|
from taskgraph.transforms.task import task_description_schema
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
from voluptuous import (
|
|
|
|
Any,
|
|
|
|
Optional,
|
|
|
|
Required,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
def _by_platform(arg):
|
|
|
|
return optionally_keyed_by('build-platform', arg)
|
|
|
|
|
2017-06-15 19:10:59 +03:00
|
|
|
|
2017-03-22 19:48:40 +03:00
|
|
|
# Voluptuous uses marker objects as dictionary *keys*, but they are not
|
|
|
|
# comparable, so we cast all of the keys back to regular strings
|
|
|
|
job_description_schema = {str(k): v for k, v in job_description_schema.schema.iteritems()}
|
2017-12-06 06:24:25 +03:00
|
|
|
task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()}
|
2017-03-22 19:48:40 +03:00
|
|
|
|
2018-10-25 01:16:49 +03:00
|
|
|
l10n_description_schema = schema.extend({
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
# Name for this job, inferred from the dependent job before validation
|
|
|
|
Required('name'): basestring,
|
|
|
|
|
|
|
|
# build-platform, inferred from dependent job before validation
|
|
|
|
Required('build-platform'): basestring,
|
|
|
|
|
|
|
|
# max run time of the task
|
|
|
|
Required('run-time'): _by_platform(int),
|
|
|
|
|
2017-04-19 17:35:18 +03:00
|
|
|
# Locales not to repack for
|
|
|
|
Required('ignore-locales'): _by_platform([basestring]),
|
|
|
|
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
# All l10n jobs use mozharness
|
|
|
|
Required('mozharness'): {
|
|
|
|
# Script to invoke for mozharness
|
|
|
|
Required('script'): _by_platform(basestring),
|
|
|
|
|
|
|
|
# Config files passed to the mozharness script
|
|
|
|
Required('config'): _by_platform([basestring]),
|
|
|
|
|
2017-11-27 23:47:29 +03:00
|
|
|
# Additional paths to look for mozharness configs in. These should be
|
|
|
|
# relative to the base of the source checkout
|
2018-01-30 21:51:23 +03:00
|
|
|
Optional('config-paths'): [basestring],
|
2017-11-27 23:47:29 +03:00
|
|
|
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
# Options to pass to the mozharness script
|
2018-10-24 20:57:39 +03:00
|
|
|
Optional('options'): _by_platform([basestring]),
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
|
|
|
|
# Action commands to provide to mozharness script
|
|
|
|
Required('actions'): _by_platform([basestring]),
|
2017-11-21 08:46:54 +03:00
|
|
|
|
|
|
|
# if true, perform a checkout of a comm-central based branch inside the
|
|
|
|
# gecko checkout
|
|
|
|
Required('comm-checkout', default=False): bool,
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
},
|
|
|
|
# Items for the taskcluster index
|
|
|
|
Optional('index'): {
|
|
|
|
# Product to identify as in the taskcluster index
|
|
|
|
Required('product'): _by_platform(basestring),
|
|
|
|
|
|
|
|
# Job name to identify as in the taskcluster index
|
|
|
|
Required('job-name'): _by_platform(basestring),
|
2017-01-10 00:23:04 +03:00
|
|
|
|
|
|
|
# Type of index
|
|
|
|
Optional('type'): basestring,
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
},
|
|
|
|
# Description of the localized task
|
|
|
|
Required('description'): _by_platform(basestring),
|
|
|
|
|
2017-04-03 15:53:08 +03:00
|
|
|
Optional('run-on-projects'): job_description_schema['run-on-projects'],
|
|
|
|
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
# worker-type to utilize
|
|
|
|
Required('worker-type'): _by_platform(basestring),
|
|
|
|
|
|
|
|
# File which contains the used locales
|
|
|
|
Required('locales-file'): _by_platform(basestring),
|
|
|
|
|
|
|
|
# Tooltool visibility required for task.
|
|
|
|
Required('tooltool'): _by_platform(Any('internal', 'public')),
|
|
|
|
|
Bug 1407672 - Add docker-image and toolchain support to l10n leaf jobs. r=Callek
This approach allows to specify the `docker-image` and set of
`toolchains` to the l10n leaf jobs using the `by-platform:` override
mechanism. We don't support anything but in-tree docker images at
this time, and the schema will warn if a different type of docker
configuration block is used. It wouldn't be hard to grow the
additional blocks, but let's reduce duplication for now.
It might be considered better to inherit the `docker-image` and set of
`toolchains` from the underlying `dependent-task`, but we don't do
that for two reasons. The main reason is that it's an explicit goal
to be able to "cross repack": to repack, say, a Windows binary on a
Linux worker. In that situation, the docker-image and toolchains
differ between the builder and the repack worker.
A smaller technical obstruction is that by the time the l10n transform
sees the dependent task, the docker image and set of toolchains have
been processed. The l10n transform would have to "reconstitute" the
docker image changes and the set of toolchains; it would be very
fragile.
Taken together, it's better to be explicit, reduce unexpected
interactions, and repeat the information in the l10n leaf tasks.
MozReview-Commit-ID: TmgJyYU5dx
--HG--
extra : rebase_source : 9aae494165d9a7c70de0f5fe4849ec219e28a20c
2017-10-11 01:57:57 +03:00
|
|
|
# Docker image required for task. We accept only in-tree images
|
|
|
|
# -- generally desktop-build or android-build -- for now.
|
|
|
|
Required('docker-image'): _by_platform(Any(
|
|
|
|
# an in-tree generated docker image (from `taskcluster/docker/<name>`)
|
|
|
|
{'in-tree': basestring},
|
|
|
|
None,
|
|
|
|
)),
|
|
|
|
|
|
|
|
Optional('toolchains'): _by_platform([basestring]),
|
|
|
|
|
2017-11-06 16:23:47 +03:00
|
|
|
# The set of secret names to which the task has access; these are prefixed
|
|
|
|
# with `project/releng/gecko/{treeherder.kind}/level-{level}/`. Setting
|
|
|
|
# this will enable any worker features required and set the task's scopes
|
|
|
|
# appropriately. `true` here means ['*'], all secrets. Not supported on
|
|
|
|
# Windows
|
|
|
|
Required('secrets', default=False): _by_platform(Any(bool, [basestring])),
|
|
|
|
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
# Information for treeherder
|
|
|
|
Required('treeherder'): {
|
|
|
|
# Platform to display the task on in treeherder
|
|
|
|
Required('platform'): _by_platform(basestring),
|
|
|
|
|
|
|
|
# Symbol to use
|
|
|
|
Required('symbol'): basestring,
|
|
|
|
|
|
|
|
# Tier this task is
|
|
|
|
Required('tier'): _by_platform(int),
|
|
|
|
},
|
|
|
|
|
|
|
|
# Extra environment values to pass to the worker
|
|
|
|
Optional('env'): _by_platform({basestring: taskref_or_string}),
|
|
|
|
|
2017-08-11 03:25:46 +03:00
|
|
|
# Max number locales per chunk
|
|
|
|
Optional('locales-per-chunk'): _by_platform(int),
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
|
2018-10-25 01:41:38 +03:00
|
|
|
# Task deps to chain this task with, added in transforms from primary-dependency
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
# if this is a nightly
|
|
|
|
Optional('dependencies'): {basestring: basestring},
|
|
|
|
|
|
|
|
# Run the task when the listed files change (if present).
|
|
|
|
Optional('when'): {
|
|
|
|
'files-changed': [basestring]
|
2017-03-22 19:48:40 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
# passed through directly to the job description
|
2017-03-22 21:00:03 +03:00
|
|
|
Optional('attributes'): job_description_schema['attributes'],
|
2017-03-22 19:48:40 +03:00
|
|
|
Optional('extra'): job_description_schema['extra'],
|
2017-12-06 06:24:25 +03:00
|
|
|
|
|
|
|
# Shipping product and phase
|
|
|
|
Optional('shipping-product'): task_description_schema['shipping-product'],
|
|
|
|
Optional('shipping-phase'): task_description_schema['shipping-phase'],
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
})
|
2016-09-29 21:59:49 +03:00
|
|
|
|
|
|
|
transforms = TransformSequence()
|
|
|
|
|
|
|
|
|
2018-02-26 17:14:46 +03:00
|
|
|
def parse_locales_file(locales_file, platform=None):
|
2016-12-13 19:06:48 +03:00
|
|
|
""" Parse the passed locales file for a list of locales.
|
|
|
|
"""
|
|
|
|
locales = []
|
2017-02-17 17:57:11 +03:00
|
|
|
|
|
|
|
with open(locales_file, mode='r') as f:
|
|
|
|
if locales_file.endswith('json'):
|
|
|
|
all_locales = json.load(f)
|
|
|
|
# XXX Only single locales are fetched
|
|
|
|
locales = {
|
|
|
|
locale: data['revision']
|
|
|
|
for locale, data in all_locales.items()
|
2018-02-26 17:14:46 +03:00
|
|
|
if platform is None or platform in data['platforms']
|
2017-02-17 17:57:11 +03:00
|
|
|
}
|
|
|
|
else:
|
|
|
|
all_locales = f.read().split()
|
|
|
|
# 'default' is the hg revision at the top of hg repo, in this context
|
|
|
|
locales = {locale: 'default' for locale in all_locales}
|
2016-12-13 19:06:48 +03:00
|
|
|
return locales
|
|
|
|
|
|
|
|
|
2017-04-19 17:35:18 +03:00
|
|
|
def _remove_locales(locales, to_remove=None):
|
2017-02-17 17:57:11 +03:00
|
|
|
# ja-JP-mac is a mac-only locale, but there are no mac builds being repacked,
|
|
|
|
# so just omit it unconditionally
|
|
|
|
return {
|
2017-04-19 17:35:18 +03:00
|
|
|
locale: revision for locale, revision in locales.items() if locale not in to_remove
|
2017-02-17 17:57:11 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
@transforms.add
|
|
|
|
def setup_name(config, jobs):
|
|
|
|
for job in jobs:
|
2018-10-24 00:12:51 +03:00
|
|
|
dep = job['primary-dependency']
|
2018-05-23 21:57:23 +03:00
|
|
|
# Set the name to the same as the dep task, without kind name.
|
|
|
|
# Label will get set automatically with this kinds name.
|
|
|
|
job['name'] = job.get('name',
|
|
|
|
dep.task['metadata']['name'][len(dep.kind) + 1:])
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
yield job
|
|
|
|
|
|
|
|
|
|
|
|
@transforms.add
|
|
|
|
def copy_in_useful_magic(config, jobs):
|
|
|
|
for job in jobs:
|
2018-10-24 00:12:51 +03:00
|
|
|
dep = job['primary-dependency']
|
2018-05-23 01:22:37 +03:00
|
|
|
attributes = copy_attributes_from_dependent_job(dep)
|
|
|
|
attributes.update(job.get('attributes', {}))
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
# build-platform is needed on `job` for by-build-platform
|
2018-05-23 01:22:37 +03:00
|
|
|
job['build-platform'] = attributes.get("build_platform")
|
|
|
|
job['attributes'] = attributes
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
yield job
|
|
|
|
|
|
|
|
|
2018-11-21 02:44:12 +03:00
|
|
|
transforms.add_validate(l10n_description_schema)
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
|
|
|
|
|
|
|
|
@transforms.add
|
|
|
|
def setup_nightly_dependency(config, jobs):
|
|
|
|
""" Sets up a task dependency to the signing job this relates to """
|
|
|
|
for job in jobs:
|
2018-06-15 21:50:50 +03:00
|
|
|
job['dependencies'] = {'build': job['dependent-tasks']['build'].label}
|
2017-08-15 02:10:43 +03:00
|
|
|
if job['attributes']['build_platform'].startswith('win') or \
|
|
|
|
job['attributes']['build_platform'].startswith('linux'):
|
2017-07-18 21:22:15 +03:00
|
|
|
job['dependencies'].update({
|
2018-06-15 21:50:50 +03:00
|
|
|
'build-signing': job['dependent-tasks']['build-signing'].label,
|
2017-08-15 02:10:43 +03:00
|
|
|
})
|
2017-08-30 19:50:07 +03:00
|
|
|
if job['attributes']['build_platform'].startswith('macosx'):
|
|
|
|
job['dependencies'].update({
|
2018-06-15 21:50:50 +03:00
|
|
|
'repackage': job['dependent-tasks']['repackage'].label
|
2017-08-30 19:50:07 +03:00
|
|
|
})
|
2017-08-15 02:10:43 +03:00
|
|
|
if job['attributes']['build_platform'].startswith('win'):
|
|
|
|
job['dependencies'].update({
|
2018-06-15 21:50:50 +03:00
|
|
|
'repackage-signing': job['dependent-tasks']['repackage-signing'].label
|
2017-07-18 21:22:15 +03:00
|
|
|
})
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
yield job
|
|
|
|
|
|
|
|
|
|
|
|
@transforms.add
|
|
|
|
def handle_keyed_by(config, jobs):
|
|
|
|
"""Resolve fields that can be keyed by platform, etc."""
|
|
|
|
fields = [
|
|
|
|
"locales-file",
|
2017-08-11 03:25:46 +03:00
|
|
|
"locales-per-chunk",
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
"worker-type",
|
|
|
|
"description",
|
|
|
|
"run-time",
|
Bug 1407672 - Add docker-image and toolchain support to l10n leaf jobs. r=Callek
This approach allows to specify the `docker-image` and set of
`toolchains` to the l10n leaf jobs using the `by-platform:` override
mechanism. We don't support anything but in-tree docker images at
this time, and the schema will warn if a different type of docker
configuration block is used. It wouldn't be hard to grow the
additional blocks, but let's reduce duplication for now.
It might be considered better to inherit the `docker-image` and set of
`toolchains` from the underlying `dependent-task`, but we don't do
that for two reasons. The main reason is that it's an explicit goal
to be able to "cross repack": to repack, say, a Windows binary on a
Linux worker. In that situation, the docker-image and toolchains
differ between the builder and the repack worker.
A smaller technical obstruction is that by the time the l10n transform
sees the dependent task, the docker image and set of toolchains have
been processed. The l10n transform would have to "reconstitute" the
docker image changes and the set of toolchains; it would be very
fragile.
Taken together, it's better to be explicit, reduce unexpected
interactions, and repeat the information in the l10n leaf tasks.
MozReview-Commit-ID: TmgJyYU5dx
--HG--
extra : rebase_source : 9aae494165d9a7c70de0f5fe4849ec219e28a20c
2017-10-11 01:57:57 +03:00
|
|
|
"docker-image",
|
2017-11-06 16:23:47 +03:00
|
|
|
"secrets",
|
Bug 1407672 - Add docker-image and toolchain support to l10n leaf jobs. r=Callek
This approach allows to specify the `docker-image` and set of
`toolchains` to the l10n leaf jobs using the `by-platform:` override
mechanism. We don't support anything but in-tree docker images at
this time, and the schema will warn if a different type of docker
configuration block is used. It wouldn't be hard to grow the
additional blocks, but let's reduce duplication for now.
It might be considered better to inherit the `docker-image` and set of
`toolchains` from the underlying `dependent-task`, but we don't do
that for two reasons. The main reason is that it's an explicit goal
to be able to "cross repack": to repack, say, a Windows binary on a
Linux worker. In that situation, the docker-image and toolchains
differ between the builder and the repack worker.
A smaller technical obstruction is that by the time the l10n transform
sees the dependent task, the docker image and set of toolchains have
been processed. The l10n transform would have to "reconstitute" the
docker image changes and the set of toolchains; it would be very
fragile.
Taken together, it's better to be explicit, reduce unexpected
interactions, and repeat the information in the l10n leaf tasks.
MozReview-Commit-ID: TmgJyYU5dx
--HG--
extra : rebase_source : 9aae494165d9a7c70de0f5fe4849ec219e28a20c
2017-10-11 01:57:57 +03:00
|
|
|
"toolchains",
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
"tooltool",
|
|
|
|
"env",
|
2017-04-19 17:35:18 +03:00
|
|
|
"ignore-locales",
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
"mozharness.config",
|
|
|
|
"mozharness.options",
|
|
|
|
"mozharness.actions",
|
|
|
|
"mozharness.script",
|
|
|
|
"treeherder.tier",
|
|
|
|
"treeherder.platform",
|
|
|
|
"index.product",
|
|
|
|
"index.job-name",
|
|
|
|
"when.files-changed",
|
|
|
|
]
|
|
|
|
for job in jobs:
|
|
|
|
job = copy.deepcopy(job) # don't overwrite dict values here
|
|
|
|
for field in fields:
|
|
|
|
resolve_keyed_by(item=job, field=field, item_name=job['name'])
|
|
|
|
yield job
|
|
|
|
|
|
|
|
|
2018-03-13 22:13:51 +03:00
|
|
|
@transforms.add
|
|
|
|
def handle_artifact_prefix(config, jobs):
|
|
|
|
"""Resolve ``artifact_prefix`` in env vars"""
|
|
|
|
for job in jobs:
|
|
|
|
artifact_prefix = get_artifact_prefix(job)
|
|
|
|
for k1, v1 in job.get('env', {}).iteritems():
|
|
|
|
if isinstance(v1, basestring):
|
|
|
|
job['env'][k1] = v1.format(
|
|
|
|
artifact_prefix=artifact_prefix
|
|
|
|
)
|
|
|
|
elif isinstance(v1, dict):
|
|
|
|
for k2, v2 in v1.iteritems():
|
|
|
|
job['env'][k1][k2] = v2.format(
|
|
|
|
artifact_prefix=artifact_prefix
|
|
|
|
)
|
|
|
|
yield job
|
|
|
|
|
|
|
|
|
2016-12-13 19:06:48 +03:00
|
|
|
@transforms.add
|
|
|
|
def all_locales_attribute(config, jobs):
|
|
|
|
for job in jobs:
|
2017-12-05 03:50:03 +03:00
|
|
|
locales_platform = job['attributes']['build_platform'].replace("-nightly", "")
|
2018-02-26 17:14:46 +03:00
|
|
|
locales_with_changesets = parse_locales_file(job["locales-file"],
|
|
|
|
platform=locales_platform)
|
2017-04-19 17:35:18 +03:00
|
|
|
locales_with_changesets = _remove_locales(locales_with_changesets,
|
|
|
|
to_remove=job['ignore-locales'])
|
2017-02-17 17:57:11 +03:00
|
|
|
|
|
|
|
locales = sorted(locales_with_changesets.keys())
|
2016-12-13 19:06:48 +03:00
|
|
|
attributes = job.setdefault('attributes', {})
|
|
|
|
attributes["all_locales"] = locales
|
2017-02-17 17:57:11 +03:00
|
|
|
attributes["all_locales_with_changesets"] = locales_with_changesets
|
2017-12-06 06:24:25 +03:00
|
|
|
if job.get('shipping-product'):
|
|
|
|
attributes["shipping_product"] = job['shipping-product']
|
2016-12-13 19:06:48 +03:00
|
|
|
yield job
|
|
|
|
|
|
|
|
|
|
|
|
@transforms.add
|
|
|
|
def chunk_locales(config, jobs):
|
|
|
|
""" Utilizes chunking for l10n stuff """
|
|
|
|
for job in jobs:
|
2017-08-11 03:25:46 +03:00
|
|
|
locales_per_chunk = job.get('locales-per-chunk')
|
2017-02-17 17:57:11 +03:00
|
|
|
locales_with_changesets = job['attributes']['all_locales_with_changesets']
|
2017-08-11 03:25:46 +03:00
|
|
|
if locales_per_chunk:
|
|
|
|
chunks, remainder = divmod(len(locales_with_changesets), locales_per_chunk)
|
|
|
|
if remainder:
|
|
|
|
chunks = int(chunks + 1)
|
2016-12-13 19:06:48 +03:00
|
|
|
for this_chunk in range(1, chunks + 1):
|
|
|
|
chunked = copy.deepcopy(job)
|
|
|
|
chunked['name'] = chunked['name'].replace(
|
|
|
|
'/', '-{}/'.format(this_chunk), 1
|
|
|
|
)
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
chunked['mozharness']['options'] = chunked['mozharness'].get('options', [])
|
2017-02-17 17:57:11 +03:00
|
|
|
# chunkify doesn't work with dicts
|
2017-09-25 20:17:07 +03:00
|
|
|
locales_with_changesets_as_list = sorted(locales_with_changesets.items())
|
2017-02-17 17:57:11 +03:00
|
|
|
chunked_locales = chunkify(locales_with_changesets_as_list, this_chunk, chunks)
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
chunked['mozharness']['options'].extend([
|
2017-02-17 17:57:11 +03:00
|
|
|
'locale={}:{}'.format(locale, changeset)
|
|
|
|
for locale, changeset in chunked_locales
|
|
|
|
])
|
2016-12-13 19:06:48 +03:00
|
|
|
chunked['attributes']['l10n_chunk'] = str(this_chunk)
|
2017-02-17 17:57:11 +03:00
|
|
|
# strip revision
|
|
|
|
chunked['attributes']['chunk_locales'] = [locale for locale, _ in chunked_locales]
|
2016-12-13 19:06:48 +03:00
|
|
|
|
|
|
|
# add the chunk number to the TH symbol
|
2018-05-15 22:00:18 +03:00
|
|
|
chunked["treeherder"]["symbol"] = add_suffix(
|
|
|
|
chunked["treeherder"]["symbol"], this_chunk)
|
2016-12-13 19:06:48 +03:00
|
|
|
yield chunked
|
|
|
|
else:
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
job['mozharness']['options'] = job['mozharness'].get('options', [])
|
|
|
|
job['mozharness']['options'].extend([
|
2017-02-17 17:57:11 +03:00
|
|
|
'locale={}:{}'.format(locale, changeset)
|
2017-09-25 20:17:07 +03:00
|
|
|
for locale, changeset in sorted(locales_with_changesets.items())
|
2017-02-17 17:57:11 +03:00
|
|
|
])
|
2016-12-13 19:06:48 +03:00
|
|
|
yield job
|
|
|
|
|
|
|
|
|
2016-09-29 21:59:49 +03:00
|
|
|
@transforms.add
|
|
|
|
def mh_config_replace_project(config, jobs):
|
|
|
|
""" Replaces {project} in mh config entries with the current project """
|
|
|
|
# XXXCallek This is a bad pattern but exists to satisfy ease-of-porting for buildbot
|
|
|
|
for job in jobs:
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
job['mozharness']['config'] = map(
|
2016-09-29 21:59:49 +03:00
|
|
|
lambda x: x.format(project=config.params['project']),
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
job['mozharness']['config']
|
2016-09-29 21:59:49 +03:00
|
|
|
)
|
|
|
|
yield job
|
|
|
|
|
|
|
|
|
|
|
|
@transforms.add
|
|
|
|
def mh_options_replace_project(config, jobs):
|
|
|
|
""" Replaces {project} in mh option entries with the current project """
|
|
|
|
# XXXCallek This is a bad pattern but exists to satisfy ease-of-porting for buildbot
|
|
|
|
for job in jobs:
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
job['mozharness']['options'] = map(
|
2016-09-29 21:59:49 +03:00
|
|
|
lambda x: x.format(project=config.params['project']),
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
job['mozharness']['options']
|
2016-09-29 21:59:49 +03:00
|
|
|
)
|
|
|
|
yield job
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
|
|
|
|
|
2018-11-21 02:44:12 +03:00
|
|
|
transforms.add_validate(l10n_description_schema)
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
|
|
|
|
|
2018-05-23 01:22:37 +03:00
|
|
|
@transforms.add
|
|
|
|
def stub_installer(config, jobs):
|
|
|
|
for job in jobs:
|
|
|
|
job.setdefault('attributes', {})
|
|
|
|
job.setdefault('env', {})
|
|
|
|
if job["attributes"].get('stub-installer'):
|
|
|
|
job['env'].update({"USE_STUB_INSTALLER": "1"})
|
|
|
|
yield job
|
|
|
|
|
|
|
|
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
@transforms.add
|
|
|
|
def make_job_description(config, jobs):
|
|
|
|
for job in jobs:
|
2017-11-21 08:46:54 +03:00
|
|
|
job['mozharness'].update({
|
|
|
|
'using': 'mozharness',
|
|
|
|
'job-script': 'taskcluster/scripts/builder/build-l10n.sh',
|
|
|
|
'secrets': job['secrets'],
|
|
|
|
})
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
job_description = {
|
|
|
|
'name': job['name'],
|
|
|
|
'worker-type': job['worker-type'],
|
|
|
|
'description': job['description'],
|
2017-11-21 08:46:54 +03:00
|
|
|
'run': job['mozharness'],
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
'attributes': job['attributes'],
|
|
|
|
'treeherder': {
|
|
|
|
'kind': 'build',
|
|
|
|
'tier': job['treeherder']['tier'],
|
|
|
|
'symbol': job['treeherder']['symbol'],
|
|
|
|
'platform': job['treeherder']['platform'],
|
|
|
|
},
|
2017-04-03 15:53:08 +03:00
|
|
|
'run-on-projects': job.get('run-on-projects') if job.get('run-on-projects') else [],
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
}
|
2017-07-18 21:22:15 +03:00
|
|
|
if job.get('extra'):
|
|
|
|
job_description['extra'] = job['extra']
|
|
|
|
|
|
|
|
if job['worker-type'].endswith("-b-win2012"):
|
|
|
|
job_description['worker'] = {
|
|
|
|
'os': 'windows',
|
|
|
|
'max-run-time': 7200,
|
|
|
|
'chain-of-trust': True,
|
|
|
|
}
|
|
|
|
job_description['run']['use-simple-package'] = False
|
|
|
|
job_description['run']['use-magic-mh-args'] = False
|
|
|
|
else:
|
|
|
|
job_description['worker'] = {
|
|
|
|
'max-run-time': job['run-time'],
|
|
|
|
'chain-of-trust': True,
|
|
|
|
}
|
|
|
|
job_description['run']['tooltool-downloads'] = job['tooltool']
|
|
|
|
job_description['run']['need-xvfb'] = True
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
|
Bug 1407672 - Add docker-image and toolchain support to l10n leaf jobs. r=Callek
This approach allows to specify the `docker-image` and set of
`toolchains` to the l10n leaf jobs using the `by-platform:` override
mechanism. We don't support anything but in-tree docker images at
this time, and the schema will warn if a different type of docker
configuration block is used. It wouldn't be hard to grow the
additional blocks, but let's reduce duplication for now.
It might be considered better to inherit the `docker-image` and set of
`toolchains` from the underlying `dependent-task`, but we don't do
that for two reasons. The main reason is that it's an explicit goal
to be able to "cross repack": to repack, say, a Windows binary on a
Linux worker. In that situation, the docker-image and toolchains
differ between the builder and the repack worker.
A smaller technical obstruction is that by the time the l10n transform
sees the dependent task, the docker image and set of toolchains have
been processed. The l10n transform would have to "reconstitute" the
docker image changes and the set of toolchains; it would be very
fragile.
Taken together, it's better to be explicit, reduce unexpected
interactions, and repeat the information in the l10n leaf tasks.
MozReview-Commit-ID: TmgJyYU5dx
--HG--
extra : rebase_source : 9aae494165d9a7c70de0f5fe4849ec219e28a20c
2017-10-11 01:57:57 +03:00
|
|
|
if job.get('docker-image'):
|
|
|
|
job_description['worker']['docker-image'] = job['docker-image']
|
|
|
|
|
|
|
|
if job.get('toolchains'):
|
|
|
|
job_description['toolchains'] = job['toolchains']
|
|
|
|
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
if job.get('index'):
|
|
|
|
job_description['index'] = {
|
|
|
|
'product': job['index']['product'],
|
|
|
|
'job-name': job['index']['job-name'],
|
2017-01-10 00:23:04 +03:00
|
|
|
'type': job['index'].get('type', 'generic'),
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
if job.get('dependencies'):
|
|
|
|
job_description['dependencies'] = job['dependencies']
|
|
|
|
if job.get('env'):
|
|
|
|
job_description['worker']['env'] = job['env']
|
|
|
|
if job.get('when', {}).get('files-changed'):
|
|
|
|
job_description.setdefault('when', {})
|
|
|
|
job_description['when']['files-changed'] = \
|
|
|
|
[job['locales-file']] + job['when']['files-changed']
|
2017-12-06 06:24:25 +03:00
|
|
|
|
|
|
|
if 'shipping-phase' in job:
|
|
|
|
job_description['shipping-phase'] = job['shipping-phase']
|
|
|
|
|
|
|
|
if 'shipping-product' in job:
|
|
|
|
job_description['shipping-product'] = job['shipping-product']
|
|
|
|
|
Bug 1322041 - Nightly l10n support, and docs. r=dustin
Involved work which landed on the date project branch with:
* No Bug, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/e7af20515b1c,
https://hg.mozilla.org/projects/date/rev/d7f0f1c6d564,
https://hg.mozilla.org/projects/date/rev/db530d7a4672)
* Bug 1171738, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/a906f6997731,
https://hg.mozilla.org/projects/date/rev/ada87315d4c0,
https://hg.mozilla.org/projects/date/rev/fbee52f145e9,
https://hg.mozilla.org/projects/date/rev/2939b68e59fc)
* Bug 1312000, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/79a2f66ff5c0)
* Bug 1312396, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/dc06c58a5663)
* Bug 1312585, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cf267b61752)
* Bug 1316527, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/cc2d9365d9b9)
* Bug 1318068, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/7cb11cb76a09)
* Bug 1326093, by Callek@gmail.com (https://hg.mozilla.org/projects/date/rev/f64a03d94ac7)
MozReview-Commit-ID: Fhom5OcIWru
--HG--
extra : rebase_source : 4e3c56d72ea7b27a7ad930534be26d19f512fa2b
2017-01-06 17:13:41 +03:00
|
|
|
yield job_description
|