Bug 1318068 - Generate balrog_props.json per locale on TC-nightly locale repacks.
MozReview-Commit-ID: 6lpICGGJu91
--- a/taskcluster/ci/nightly-l10n/kind.yml
+++ b/taskcluster/ci/nightly-l10n/kind.yml
@@ -49,17 +49,17 @@ jobs:
platform: linux32/opt
worker:
env:
EN_US_PACKAGE_NAME: target.tar.bz2
EN_US_BINARY_URL:
task-reference: https://queue.taskcluster.net/v1/task/<unsigned-build>/artifacts/public/build
run:
script: mozharness/scripts/desktop_l10n.py
- actions: [clone-locales list-locales setup repack summary]
+ actions: [clone-locales list-locales setup repack submit-to-balrog summary]
config:
- single_locale/tc_linux32.py
options:
- environment-config=single_locale/production.py
- branch-config=single_locale/{project}.py
- platform-config=single_locale/linux32.py
tooltool-downloads: public
need-xvfb: true
@@ -76,17 +76,17 @@ jobs:
platform: linux64/opt
worker:
env:
EN_US_PACKAGE_NAME: target.tar.bz2
EN_US_BINARY_URL:
task-reference: https://queue.taskcluster.net/v1/task/<unsigned-build>/artifacts/public/build
run:
script: mozharness/scripts/desktop_l10n.py
- actions: [clone-locales list-locales setup repack summary]
+ actions: [clone-locales list-locales setup repack submit-to-balrog summary]
config:
- single_locale/tc_linux64.py
options:
- environment-config=single_locale/production.py
- branch-config=single_locale/{project}.py
- platform-config=single_locale/linux64.py
tooltool-downloads: public
need-xvfb: true
--- a/testing/mozharness/configs/single_locale/tc_linux32.py
+++ b/testing/mozharness/configs/single_locale/tc_linux32.py
@@ -19,9 +19,12 @@ config = {
'TOOLTOOL_CACHE': os.environ.get('TOOLTOOL_CACHE'),
},
"upload_env": {
'UPLOAD_HOST': 'localhost',
'UPLOAD_PATH': '/home/worker/artifacts/',
},
"mozilla_dir": "src/",
"simple_name_move": True,
+
+ # XXX Don't land this!
+ "update_gecko_source_to_enUS": False,
}
--- a/testing/mozharness/scripts/desktop_l10n.py
+++ b/testing/mozharness/scripts/desktop_l10n.py
@@ -912,19 +912,16 @@ class DesktopSingleLocale(LocalesMixin,
for key in dirs.keys():
if key not in abs_dirs:
abs_dirs[key] = dirs[key]
self.abs_dirs = abs_dirs
return self.abs_dirs
def submit_to_balrog(self):
"""submit to balrog"""
- if not self.config.get("balrog_servers"):
- self.info("balrog_servers not set; skipping balrog submission.")
- return
self.info("Reading buildbot build properties...")
self.read_buildbot_config()
# get platform, appName and hashType from configuration
# common values across different locales
config = self.config
platform = config["platform"]
hashType = config['hashType']
appName = config['appName']
@@ -934,19 +931,33 @@ class DesktopSingleLocale(LocalesMixin,
self.set_buildbot_property("appName", appName)
# it's hardcoded to sha512 in balrog.py
self.set_buildbot_property("hashType", hashType)
self.set_buildbot_property("platform", platform)
# values common to the current repacks
self.set_buildbot_property("buildid", self._query_buildid())
self.set_buildbot_property("appVersion", self.query_version())
- # submit complete mar to balrog
- # clean up buildbot_properties
- self._map(self.submit_repack_to_balrog, self.query_locales())
+ # YAY
+ def balrog_props_wrapper(locale):
+ env = self._query_upload_env()
+ props_path = os.path.join(env["UPLOAD_PATH"], locale,
+ 'balrog_props.json')
+ self.generate_balrog_props(props_path)
+ return SUCCESS
+
+ if self.config.get('taskcluster_nightly'):
+ self._map(balrog_props_wrapper, self.query_locales())
+ else:
+ if not self.config.get("balrog_servers"):
+ self.info("balrog_servers not set; skipping balrog submission.")
+ return
+ # submit complete mar to balrog
+ # clean up buildbot_properties
+ self._map(self.submit_repack_to_balrog, self.query_locales())
def submit_repack_to_balrog(self, locale):
"""submit a single locale to balrog"""
# check if locale has been uploaded, if not just return a FAILURE
if locale not in self.package_urls:
self.error("%s is not present in package_urls. Did you run make upload?" % locale)
return FAILURE