Bug 1321614 - fix android_stuff kind to use build secrets, because it uses the same mozharness stuff as build jobs. r=dustin a=bustage
authorJustin Wood <Callek@gmail.com>
Thu, 01 Dec 2016 14:13:16 -0500
changeset 325035 6f39c69810f258b4108f8ee88048c5b690a503a2
parent 325034 b49684127ce464141b0a989cd621cb4794b6a85f
child 325064 b1e2d1fe6b070b71661047f94129a1ccd0a7f48f
child 325086 77937052e69946270dbb040918f421ca879c4104
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersdustin, bustage
bugs1321614
milestone53.0a1
Bug 1321614 - fix android_stuff kind to use build secrets, because it uses the same mozharness stuff as build jobs. r=dustin a=bustage MozReview-Commit-ID: D6wV1KSa6mp
taskcluster/taskgraph/transforms/android_stuff.py
--- a/taskcluster/taskgraph/transforms/android_stuff.py
+++ b/taskcluster/taskgraph/transforms/android_stuff.py
@@ -3,16 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 """
 Set dynamic task description properties of the android stuff.  Temporary!
 """
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 from taskgraph.transforms.base import TransformSequence
+from taskgraph.transforms.job.common import SECRET_SCOPE
 
 transforms = TransformSequence()
 
 
 @transforms.add
 def setup_task(config, tasks):
     for task in tasks:
         task['label'] = task['name']
@@ -37,10 +38,15 @@ def setup_task(config, tasks):
         if int(config.params['level']) > 1:
             task['worker'].setdefault('caches', []).append({
                 'type': 'persistent',
                 'name': 'level-{}-{}-build-{}-workspace'.format(
                     config.params['level'], config.params['project'], task['name']),
                 'mount-point': "/home/worker/workspace",
             })
 
+        # Need appropriate scopes for secrets, from the 'build' section
+        task['worker']['taskcluster-proxy'] = True
+        task['scopes'].append(SECRET_SCOPE.format(
+            'build', config.params['level'], '*'))
+
         del task['name']
         yield task