mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 13:56:29 +00:00
Bug 1306598 - update l10n kind to not hardcode 'try' in options. r=dustin
MozReview-Commit-ID: Hmj51RZSkf6 --HG-- extra : rebase_source : 10a6586c6d487ac6d907b69d7f6f14c5c7e1584a
This commit is contained in:
parent
8001b5d314
commit
a695dbbac1
@ -7,6 +7,7 @@
|
||||
implementation: taskgraph.task.transform:TransformTask
|
||||
|
||||
transforms:
|
||||
- taskgraph.transforms.l10n:transforms
|
||||
- taskgraph.transforms.build_attrs:transforms
|
||||
- taskgraph.transforms.job:transforms
|
||||
- taskgraph.transforms.task:transforms
|
||||
@ -58,8 +59,8 @@ jobs:
|
||||
- single_locale/tc_linux32.py
|
||||
options:
|
||||
- environment-config=single_locale/production.py
|
||||
- branch-config=single_locale/try.py # NOTE: this will need to be modified in a transform..
|
||||
- platform-config=single_locale/linux32.py # same
|
||||
- branch-config=single_locale/{project}.py
|
||||
- platform-config=single_locale/linux32.py
|
||||
- total-chunks=1
|
||||
- this-chunk=1
|
||||
tooltool-downloads: public
|
||||
@ -81,7 +82,7 @@ jobs:
|
||||
- single_locale/tc_linux64.py
|
||||
options:
|
||||
- environment-config=single_locale/production.py
|
||||
- branch-config=single_locale/try.py
|
||||
- branch-config=single_locale/{project}.py
|
||||
- platform-config=single_locale/linux64.py
|
||||
- total-chunks=1
|
||||
- this-chunk=1
|
||||
@ -104,8 +105,9 @@ jobs:
|
||||
using: mozharness
|
||||
script: mozharness/scripts/mobile_l10n.py
|
||||
actions: [clone-locales list-locales setup repack upload-repacks summary]
|
||||
config: # NOTE: this will need to be modified in a transform..
|
||||
- single_locale/try_android-api-15.py single_locale/tc_android-api-15.py
|
||||
config:
|
||||
- single_locale/{project}_android-api-15.py
|
||||
- single_locale/tc_android-api-15.py
|
||||
options:
|
||||
- total-chunks=1
|
||||
- this-chunk=1
|
||||
|
44
taskcluster/taskgraph/transforms/l10n.py
Normal file
44
taskcluster/taskgraph/transforms/l10n.py
Normal file
@ -0,0 +1,44 @@
|
||||
# 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
|
||||
|
||||
from taskgraph.transforms.base import TransformSequence
|
||||
|
||||
transforms = TransformSequence()
|
||||
|
||||
|
||||
@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:
|
||||
if not job['run'].get('using') == 'mozharness':
|
||||
# Nothing to do, not mozharness
|
||||
yield job
|
||||
continue
|
||||
job['run']['config'] = map(
|
||||
lambda x: x.format(project=config.params['project']),
|
||||
job['run']['config']
|
||||
)
|
||||
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:
|
||||
if not job['run'].get('using') == 'mozharness':
|
||||
# Nothing to do, not mozharness
|
||||
yield job
|
||||
continue
|
||||
job['run']['options'] = map(
|
||||
lambda x: x.format(project=config.params['project']),
|
||||
job['run']['options']
|
||||
)
|
||||
yield job
|
Loading…
x
Reference in New Issue
Block a user