Bug 1324094 - Add correct cache scopes to action tasks draft
authorBrian Stack <bstack@mozilla.com>
Fri, 16 Dec 2016 13:06:57 -0800
changeset 451782 4e6d225a4aedb2edb308f03bf59b7b10126fce5f
parent 450518 6b11cbf213c40ab3ba38fab885fb38784510fb6b
child 540132 e3b846d188ed38f9dd9882c0cd703971b6510e84
push id39296
push userbstack@mozilla.com
push dateWed, 21 Dec 2016 00:36:21 +0000
bugs1324094
milestone53.0a1
Bug 1324094 - Add correct cache scopes to action tasks MozReview-Commit-ID: KxtG4cHU0Mm
taskcluster/taskgraph/action.yml
taskcluster/taskgraph/decision.py
--- a/taskcluster/taskgraph/action.yml
+++ b/taskcluster/taskgraph/action.yml
@@ -12,20 +12,19 @@ workerType: "gecko-decision"
 provisionerId: "aws-provisioner-v1"
 schedulerId: "gecko-level-{{level}}"
 
 tags:
   createdForUser: {{owner}}
 
 scopes:
   # Bug 1269443: cache scopes, etc. must be listed explicitly
-  - "docker-worker:cache:level-1-*"
   - "docker-worker:cache:tooltool-cache"
   - "secrets:get:project/taskcluster/gecko/hgfingerprint"
-  - "assume:repo:hg.mozilla.org/try:*"
+  - "assume:repo:hg.mozilla.org/{{project}}:*"
 
 routes:
   - "tc-treeherder.v2.{{project}}.{{head_rev}}.{{pushlog_id}}"
   - "tc-treeherder-stage.v2.{{project}}.{{head_rev}}.{{pushlog_id}}"
 
 payload:
   env:
     GECKO_BASE_REPOSITORY: 'https://hg.mozilla.org/mozilla-unified'
--- a/taskcluster/taskgraph/decision.py
+++ b/taskcluster/taskgraph/decision.py
@@ -176,12 +176,13 @@ def write_artifact(filename, data):
 
 
 def get_action_yml(parameters):
     templates = Templates(os.path.join(GECKO, "taskcluster/taskgraph"))
     action_parameters = parameters.copy()
     action_parameters.update({
         "action": "{{action}}",
         "action_args": "{{action_args}}",
+        "project": parameters["project"],
         "from_now": json_time_from_now,
         "now": current_json_time()
     })
     return templates.load('action.yml', action_parameters)