author | Anthony Miyaguchi <amiyaguchi@mozilla.com> |
Wed, 24 Aug 2016 14:25:46 -0700 | |
changeset 406271 | cf116682ee73f192a7856980b79379b798b869de |
parent 406270 | 26cecd6e8b1a3ab43e1ba4f02798200ed8064acb |
child 406272 | a8c0fb297614cca20b19961a8207606996a58c2f |
push id | 27674 |
push user | amiyaguchi@mozilla.com |
push date | Fri, 26 Aug 2016 18:00:28 +0000 |
bugs | 1277595 |
milestone | 51.0a1 |
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',