Bug 1187966 - Set the env for periodic file update jobs so we can use TOOLTOOL_CACHE = r=nthomas
authorChris Cooper <ccooper@deadsquid.com>
Thu, 30 Jul 2015 15:47:31 -0400 (2015-07-30)
changeset 4361 dc0535892866d4fa543cc93e404491db607180c1
parent 4355 b8bf2505b183bc790470bee40184cb0137d3b8af
child 4362 ee54e04c96a348354ab14127c3923a4a1f7f6bca
child 4363 82e743b8b8a89dfd0a96c4f6f4d7482b3bbb247d
push id3652
push usercoop@mozilla.com
push dateThu, 30 Jul 2015 19:47:36 +0000 (2015-07-30)
reviewersnthomas
bugs1187966
Bug 1187966 - Set the env for periodic file update jobs so we can use TOOLTOOL_CACHE = r=nthomas
misc.py
--- a/misc.py
+++ b/misc.py
@@ -2801,16 +2801,20 @@ def mirrorAndBundleArgs(config):
             args.extend(["--bundle", bundle])
     return args
 
 
 def generatePeriodicFileUpdateBuilder(config, branch_name, platform, base_name, slaves):
     pf = config['platforms'].get(platform, {})
     extra_args = ['-b', config['repo_path']]
 
+    env = pf['env'].copy()
+    kwargs = {}
+    kwargs['env'] = env
+
     extra_args += mirrorAndBundleArgs(config)
     if pf['product_name'] is not None:
         extra_args.extend(['-p', pf['product_name']])
     if config['hg_username'] is not None:
         extra_args.extend(['-u', config['hg_username']])
     if config['hg_ssh_key'] is not None:
         extra_args.extend(['-k', config['hg_ssh_key']])
     if config['file_update_on_closed_tree'] is True:
@@ -2825,16 +2829,17 @@ def generatePeriodicFileUpdateBuilder(co
         extra_args.extend(['--hpkp'])
 
     periodic_file_update_factory = ScriptFactory(
         "%s%s" % (config['hgurl'],
                   config['build_tools_repo_path']),
         'scripts/periodic_file_updates/periodic_file_updates.sh',
         interpreter='bash',
         extra_args=extra_args,
+        **kwargs
     )
     periodic_file_update_builder = {
         'name': '%s periodic file update' % base_name,
         'slavenames': slaves,
         'builddir': '%s-%s-periodicupdate' % (branch_name, platform),
         'slavebuilddir': normalizeName('%s-%s-periodicupdate' % (branch_name, platform)),
         'factory': periodic_file_update_factory,
         'category': branch_name,