-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.taskcluster.yml
83 lines (78 loc) · 2.84 KB
/
.taskcluster.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
version: 1
policy:
pullRequests: public
tasks:
$let:
user: ${event.sender.login}
head_branch:
$if: 'tasks_for == "github-pull-request"'
then: ${event.pull_request.head.ref}
else:
$if: 'tasks_for == "github-push"'
then: ${event.ref}
else: ${event.release.target_commitish}
head_rev:
$if: 'tasks_for == "github-pull-request"'
then: ${event.pull_request.head.sha}
else:
$if: 'tasks_for == "github-push"'
then: ${event.after}
else: ${event.release.tag_name}
repository:
$if: 'tasks_for == "github-pull-request"'
then: ${event.pull_request.head.repo.html_url}
else: ${event.repository.html_url}
taskboot_image: "mozilla/taskboot:0.3.2"
in:
$if: 'tasks_for == "github-push" || (tasks_for == "github-pull-request" && event["action"] in ["opened", "reopened", "synchronize"])'
then:
- taskId: { $eval: as_slugid("lint_task") }
created: { $fromNow: "" }
deadline: { $fromNow: "1 hour" }
provisionerId: proj-relman
workerType: ci
payload:
maxRunTime: 3600
image: python:3.9
command:
- "/bin/bash"
- "-lcx"
- "git clone --quiet ${repository} &&
cd stab-crashes &&
git -c advice.detachedHead=false checkout ${head_rev} &&
pip install --quiet -r test-requirements.txt &&
pre-commit run -a --show-diff-on-failure"
metadata:
name: stab-crashes lint
description: stab-crashes lint
owner: [email protected]
source: ${repository}/raw/${head_rev}/.taskcluster.yml
- $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
then:
dependencies:
- { $eval: as_slugid("lint_task") }
scopes:
- hooks:modify-hook:project-relman/stab-crashes
- assume:hook-id:project-relman/stab-crashes
- secrets:get:project/relman/stab-crashes/deploy
created: { $fromNow: "" }
deadline: { $fromNow: "1 hour" }
provisionerId: proj-relman
workerType: ci
payload:
features:
taskclusterProxy: true
maxRunTime: 3600
image: "${taskboot_image}"
command:
- "/bin/sh"
- "-lcxe"
- "git clone --quiet ${repository} &&
cd stab-crashes &&
git -c advice.detachedHead=false checkout ${head_rev} &&
taskboot --target . build-hook taskcluster-hook.json project-relman stab-crashes"
metadata:
name: stab-crashes update hook
description: stab-crashes update hook
owner: [email protected]
source: ${repository}/raw/${head_rev}/.taskcluster.yml