Bug 1277595 - Enable multil10n fennec builds on taskcluster
This patch enables support for l10n repack builds by modifying the mozharness
script to support differences in build environments. This is acheived through
fixing a few paths, and changing the UPLOAD_PATH for artifact uploads. These
changes are enabled on a temporary fennec kind.
MozReview-Commit-ID: H9D6UP5KN9b
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/taskcluster_nightly.py
@@ -0,0 +1,5 @@
+config = {
+ 'nightly_build': True,
+ 'taskcluster_nightly': True,
+}
+
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -913,16 +913,24 @@ or run without that action (ie: --no-{ac
'stage_ssh_key': c['stage_ssh_key']
}
if self.query_is_nightly():
mach_env['LATEST_MAR_DIR'] = c['latest_mar_dir'] % {
'branch': self.branch
}
+ # this prevents taskcluster from overwriting the target files with
+ # the multilocale files. Put everything from the en-US build in a
+ # separate folder.
+ if multiLocale and self.config.get('taskcluster_nightly'):
+ if 'UPLOAD_PATH' in mach_env:
+ mach_env['UPLOAD_PATH'] = os.path.join(mach_env['UPLOAD_PATH'],
+ 'en-US')
+
# _query_post_upload_cmd returns a list (a cmd list), for env sake here
# let's make it a string
if c.get('is_automation'):
pst_up_cmd = ' '.join([str(i) for i in self._query_post_upload_cmd(multiLocale)])
mach_env['POST_UPLOAD_CMD'] = pst_up_cmd
return mach_env
@@ -1630,27 +1638,38 @@ or run without that action (ie: --no-{ac
if not self.query_is_nightly():
self.info("Not a nightly build, skipping multi l10n.")
return
self._initialize_taskcluster()
dirs = self.query_abs_dirs()
base_work_dir = dirs['base_work_dir']
objdir = dirs['abs_obj_dir']
- branch = self.buildbot_config['properties']['branch']
+ branch = self.branch
# Some android versions share the same .json config - if
# multi_locale_config_platform is set, use that the .json name;
# otherwise, use the buildbot platform.
+ default_platform = self.buildbot_config['properties'].get('platform',
+ 'android')
+
multi_config_pf = self.config.get('multi_locale_config_platform',
- self.buildbot_config['properties']['platform'])
+ default_platform)
+
+ # The l10n script location differs on buildbot and taskcluster
+ if self.config.get('taskcluster_nightly'):
+ multil10n_path = \
+ 'build/src/testing/mozharness/scripts/multil10n.py'
+ base_work_dir = os.path.join(base_work_dir, 'workspace')
+ else:
+ multil10n_path = '%s/scripts/scripts/multil10n.py' % base_work_dir,
cmd = [
self.query_exe('python'),
- '%s/scripts/scripts/multil10n.py' % base_work_dir,
+ multil10n_path,
'--config-file',
'multi_locale/%s_%s.json' % (branch, multi_config_pf),
'--config-file',
'multi_locale/android-mozharness-build.json',
'--merge-locales',
'--pull-locale-source',
'--add-locales',
'--package-multi',