Bug 1332407 - TC based nightlies should have en-US and "multi locale" routes as well. r=dustin
MozReview-Commit-ID: KwVqrYFfDUD
This commit is contained in:
@@ -93,7 +93,7 @@ task_description_schema = Schema({
|
||||
'job-name': basestring,
|
||||
|
||||
# Type of gecko v2 index to use
|
||||
'type': Any('generic', 'nightly', 'l10n'),
|
||||
'type': Any('generic', 'nightly', 'l10n', 'nightly-with-multi-l10n'),
|
||||
|
||||
# The rank that the task will receive in the TaskCluster
|
||||
# index. A newly completed task supercedes the currently
|
||||
@@ -661,11 +661,21 @@ def add_nightly_index_routes(config, task):
|
||||
for tpl in V2_NIGHTLY_TEMPLATES:
|
||||
routes.append(tpl.format(**subs))
|
||||
|
||||
# Also add routes for en-US
|
||||
task = add_l10n_index_routes(config, task, force_locale="en-US")
|
||||
|
||||
return task
|
||||
|
||||
|
||||
@index_builder('nightly-with-multi-l10n')
|
||||
def add_nightly_multi_index_routes(config, task):
|
||||
task = add_nightly_index_routes(config, task)
|
||||
task = add_l10n_index_routes(config, task, force_locale="multi")
|
||||
return task
|
||||
|
||||
|
||||
@index_builder('l10n')
|
||||
def add_l10n_index_routes(config, task):
|
||||
def add_l10n_index_routes(config, task, force_locale=None):
|
||||
index = task.get('index')
|
||||
routes = task.setdefault('routes', [])
|
||||
|
||||
@@ -682,6 +692,10 @@ def add_l10n_index_routes(config, task):
|
||||
locales = task['attributes'].get('chunk_locales',
|
||||
task['attributes'].get('all_locales'))
|
||||
|
||||
if force_locale:
|
||||
# Used for en-US and multi-locale
|
||||
locales = [force_locale]
|
||||
|
||||
if not locales:
|
||||
raise Exception("Error: Unable to use l10n index for tasks without locales")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user