Bug 1321614 - fix android_stuff kind to use build secrets, because it uses the same mozharness stuff as build jobs. r=dustin draft
authorJustin Wood <Callek@gmail.com>
Thu, 01 Dec 2016 14:13:16 -0500
changeset 446767 ea2a3ad899d9e099631c0d06efceeaf260383f0a
parent 446442 f2166c9e87ce913c21390e0be0461de06385dd59
child 538856 876cd28bd20c9117d54f903140127c7d7032af15
push id37871
push userCallek@gmail.com
push dateThu, 01 Dec 2016 20:17:23 +0000
reviewersdustin
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 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