Skip to content

Commit 6501a2c

Browse files
committed
Add hook kind
1 parent e5ebd70 commit 6501a2c

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

taskcluster/kinds/hook/kind.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
loader: taskgraph.loader.transform:loader
2+
3+
transforms:
4+
- taskgraph.transforms.task_context
5+
- taskgraph.transforms.run
6+
- taskgraph.transforms.task
7+
8+
kind-dependencies:
9+
- deploy
10+
11+
tasks:
12+
integration:
13+
description: Update Taskcluster hook for integration tests
14+
run-on-tasks-for:
15+
- github-push
16+
run-on-git-branches:
17+
- testing
18+
- production
19+
worker-type: b-linux
20+
worker:
21+
docker-image: { in-tree: taskboot }
22+
max-run-time: 3600
23+
taskcluster-proxy: true
24+
env:
25+
TASKCLUSTER_SECRET: "project/relman/code-review/deploy-{channel}"
26+
scopes:
27+
- "secrets:get:project/relman/code-review/deploy-{channel}"
28+
- "assume:hook-id:project-relman/code-review-integration-{channel}"
29+
- "hooks:modify-hook:project-relman/code-review-integration-{channel}"
30+
run:
31+
using: run-task
32+
cwd: "{checkout}"
33+
command: >-
34+
sed -i -e 's/CHANNEL/{channel}/g' -e 's/REVISION/{head_rev}/g'
35+
/builds/worker/checkouts/vcs/integration/taskcluster-hook.json &&
36+
taskboot --target /builds/worker/checkouts/vcs
37+
build-hook integration/taskcluster-hook.json
38+
project-relman code-review-integration-{channel}
39+
task-context:
40+
from-parameters:
41+
channel: channel
42+
head_rev: head_rev
43+
substitution-fields:
44+
- run.command
45+
- worker.env.TASKCLUSTER_SECRET
46+
- scopes
47+
dependencies:
48+
deploy: deploy-integration

0 commit comments

Comments
 (0)