Skip to content

Commit

Permalink
Setup checkout cache for code review testing hook (#32)
Browse files Browse the repository at this point in the history
* Setup checkout cache for code review testing hook

* Request cache scope for code-review-testing hook

* Set scope on runtime role too
  • Loading branch information
Bastien Abadie authored Jul 18, 2024
1 parent 5f3f923 commit 519ee59
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions grants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2583,6 +2583,7 @@
- grant:
- secrets:get:project/relman/code-review/runtime-testing
- hooks:trigger-hook:project-relman/code-review-testing
- generic-worker:cache:code-review-testing-checkout
to:
- roles:
- project:relman:code-review/runtime/testing
Expand Down
1 change: 1 addition & 0 deletions hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ project-relman/code-review-testing:
- queue:route:notify.email.*
- queue:scheduler-id:relman
- secrets:get:project/relman/code-review/runtime-testing
- generic-worker:cache:code-review-testing-checkout
template_file: hooks/project-relman/code-review-testing.yml
bindings:
- exchange: exchange/taskcluster-queue/v1/task-completed
Expand Down
6 changes: 5 additions & 1 deletion hooks/project-relman/code-review-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ payload:
public/results:
path: /tmp/results
type: directory
cache: {}
cache:
code-review-testing-checkout: '/checkouts'
capabilities: {}
command:
- code-review-bot
- '--taskcluster-secret'
- project/relman/code-review/runtime-testing
- '--mercurial-repository'
- '/checkouts'
env:
$merge:
- $if: firedBy == 'triggerHook'
Expand Down Expand Up @@ -54,5 +57,6 @@ scopes:
- 'secrets:get:project/relman/code-review/runtime-testing'
- 'index:insert-task:project.relman.testing.code-review.*'
- 'notify:email:*'
- 'generic-worker:cache:code-review-testing-checkout'
tags: {}
workerType: bot-gcp

0 comments on commit 519ee59

Please sign in to comment.