Bug 1332407 - TC based nightlies should have en-US and "multi locale" routes as well. r=dustin
MozReview-Commit-ID: KwVqrYFfDUD
--- a/taskcluster/ci/build/android.yml
+++ b/taskcluster/ci/build/android.yml
@@ -101,17 +101,17 @@ android-api-15/opt:
android-api-15-nightly/opt:
description: "Android 4.0 API15+ Nightly"
attributes:
nightly: true
index:
product: mobile
job-name: android-api-15-opt
- type: nightly
+ type: nightly-with-multi-l10n
treeherder:
platform: android-4-0-armv7-api15/opt
symbol: tc(N)
worker-type: aws-provisioner-v1/gecko-{level}-b-android
worker:
implementation: docker-worker
max-run-time: 7200
run:
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -88,17 +88,17 @@ task_description_schema = Schema({
Optional('index'): {
# the name of the product this build produces
'product': Any('firefox', 'mobile', 'static-analysis'),
# the names to use for this job in the TaskCluster index
'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
# indexed task iff it has a higher rank. If unspecified,
# 'by-tier' behavior will be used.
'rank': Any(
# Rank is equal the timestamp of the build_date for tier-1
# tasks, and zero for non-tier-1. This sorts tier-{2,3}
@@ -656,37 +656,51 @@ def add_nightly_index_routes(config, tas
time.gmtime(config.params['build_date']))
subs['build_date'] = time.strftime("%Y.%m.%d",
time.gmtime(config.params['build_date']))
subs['product'] = index['product']
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', [])
job_name = index['job-name']
if job_name not in JOB_NAME_WHITELIST:
raise Exception(JOB_NAME_WHITELIST_ERROR.format(job_name))
subs = config.params.copy()
subs['job-name'] = job_name
subs['build_date_long'] = time.strftime("%Y.%m.%d.%Y%m%d%H%M%S",
time.gmtime(config.params['build_date']))
subs['product'] = index['product']
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")
# If there are too many locales, we can't write a route for all of them
# See Bug 1323792
if len(locales) > 18: # 18 * 3 = 54, max routes = 64
return task