diff --git a/.taskcluster.yml b/.taskcluster.yml index f7ec151f292..f327868440d 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -18,6 +18,8 @@ tasks: source: ${event.compare} scopes: - "queue:create-task:aws-provisioner-v1/github-worker" + - "docker-worker:cache:cargo-registry-cache" + - "docker-worker:cache:cargo-git-cache" payload: maxRunTime: 600 diff --git a/decision-task.py b/decision-task.py index dba40d7e238..a0a6acc468f 100644 --- a/decision-task.py +++ b/decision-task.py @@ -19,9 +19,18 @@ payload = { "owner": os.environ["DECISION_TASK_OWNER"], "source": os.environ["DECISION_TASK_SOURCE"], }, + # https://docs.taskcluster.net/docs/reference/workers/docker-worker/docs/caches + "scopes": [ + "docker-worker:cache:cargo-registry-cache", + "docker-worker:cache:cargo-git-cache", + ], "payload": { "maxRunTime": 600, "image": "buildpack-deps:bionic-scm", + "cache": { + "cargo-registry-cache": "/root/.cargo/registry", + "cargo-git-cache": "/root/.cargo/git", + }, "command": [ "/bin/bash", "--login",