From 7c8ba1c8fc1c970167a6213a9c1c1bbee9a28226 Mon Sep 17 00:00:00 2001 From: Bastien Abadie Date: Mon, 4 Nov 2024 19:57:59 +0100 Subject: [PATCH] Setup checkout cache for code review production hook --- grants.yml | 1 + hooks.yml | 1 + hooks/project-relman/code-review-production.yml | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/grants.yml b/grants.yml index f129c36b..968dd561 100644 --- a/grants.yml +++ b/grants.yml @@ -2556,6 +2556,7 @@ - grant: - secrets:get:project/relman/code-review/runtime-production - hooks:trigger-hook:project-relman/code-review-production + - docker-worker:cache:code-review-production-checkout to: - roles: - project:relman:code-review/runtime/production diff --git a/hooks.yml b/hooks.yml index f65c7f41..8444c694 100644 --- a/hooks.yml +++ b/hooks.yml @@ -163,6 +163,7 @@ project-relman/code-review-production: - queue:route:notify.email.* - queue:scheduler-id:relman - secrets:get:project/relman/code-review/runtime-production + - docker-worker:cache:code-review-production-checkout template_file: hooks/project-relman/code-review-production.yml bindings: - exchange: exchange/taskcluster-queue/v1/task-completed diff --git a/hooks/project-relman/code-review-production.yml b/hooks/project-relman/code-review-production.yml index 58647028..96b6244f 100644 --- a/hooks/project-relman/code-review-production.yml +++ b/hooks/project-relman/code-review-production.yml @@ -16,12 +16,15 @@ payload: public/results: path: /tmp/results type: directory - cache: {} + cache: + code-review-production-checkout: '/checkouts' capabilities: {} command: - code-review-bot - '--taskcluster-secret' - project/relman/code-review/runtime-production + - '--mercurial-repository' + - '/checkouts' env: $merge: - $if: firedBy == 'triggerHook' @@ -54,5 +57,6 @@ scopes: - 'secrets:get:project/relman/code-review/runtime-production' - 'index:insert-task:project.relman.production.code-review.*' - 'notify:email:*' + - 'docker-worker:cache:code-review-production-checkout' tags: {} workerType: bot-gcp