forked from mozilla/application-services
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.taskcluster.yml
124 lines (109 loc) · 4.92 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
version: 1
policy:
# https://docs.taskcluster.net/docs/reference/integrations/taskcluster-github/docs/taskcluster-yml-v1#pull-requests
pullRequests: collaborators
tasks:
- $if: 'tasks_for == "github-pull-request"'
then:
$if: 'event.action in ["opened", "reopened", "synchronize"]'
then:
taskGroupId: {$eval: as_slugid("decision_task")}
taskId: {$eval: as_slugid("decision_task")}
provisionerId: aws-provisioner-v1
workerType: application-services-r
created: {$fromNow: ''}
deadline: {$fromNow: '1 day'}
metadata:
name: "Application Services: GitHub decision task"
description: ""
owner: &task_owner ${event.pull_request.head.user.login}@users.noreply.github.com
source: &task_source ${event.pull_request.head.repo.url}
scopes:
- "queue:scheduler-id:taskcluster-github"
# So that we can use our own "application-services-r" worker-type.
- "queue:create-task:highest:aws-provisioner-v1/application-services-r"
# So that we can cache task outputs for re-use.
- "queue:route:index.project.application-services.*"
# So that we can re-use Gradle/Cargo/sccache bits between tasks.
- "docker-worker:cache:application-services-*"
# So that we can fetch the macOS SDK from internal tooltool.
- "docker-worker:relengapi-proxy:tooltool.download.internal"
payload:
maxRunTime: {$eval: '20 * 60'}
# https://github.com/servo/taskcluster-bootstrap-docker-images#decision-task
image: "servobrowser/taskcluster-bootstrap:decision-task@sha256:28045b7ec0485ef363f8cb14f194008b47e9ede99f2ea40a1e945e921fce976e"
features:
taskclusterProxy: true
env:
GIT_URL: ${event.pull_request.head.repo.clone_url}
GIT_REF: ${event.pull_request.head.ref}
GIT_SHA: ${event.pull_request.head.sha}
TASK_FOR: ${tasks_for}
TASK_OWNER: *task_owner
TASK_SOURCE: *task_source
command:
- /bin/bash
- '--login'
- '-e'
- '-c'
- >-
git init repo &&
cd repo &&
git fetch --depth 1 "$GIT_URL" "$GIT_REF" &&
git reset --hard "$GIT_SHA" &&
python3 automation/taskcluster/decision_task.py
- $if: 'tasks_for == "github-push"'
then:
$if: 'event.ref[:10] == "refs/tags/" || event.ref[:10] == "refs/heads/master"'
then:
taskGroupId: {$eval: as_slugid("decision_task")}
taskId: {$eval: as_slugid("decision_task")}
provisionerId: aws-provisioner-v1
workerType: application-services-r
created: {$fromNow: ''}
deadline: {$fromNow: '1 day'}
metadata:
name: "Application Services: GitHub decision task"
description: ""
owner: &task_owner ${event.pusher.name}@users.noreply.github.com
source: &task_source ${event.compare}
scopes:
- "queue:scheduler-id:taskcluster-github"
# So that we can use our own "application-services-r" worker-type.
- "queue:create-task:highest:aws-provisioner-v1/application-services-r"
# So that we can cache task outputs for re-use.
- "queue:route:index.project.application-services.*"
# So that we can re-use Gradle/Cargo/sccache bits between tasks.
- "docker-worker:cache:application-services-*"
# So that we can fetch the macOS SDK from internal tooltool.
- "docker-worker:relengapi-proxy:tooltool.download.internal"
# So that we can publish to nalexander@'s personal bintray
# at https://bintray.com/ncalexander/application-services.
- "secrets:get:project/application-services/publish"
payload:
maxRunTime: {$eval: '20 * 60'}
# https://github.com/servo/taskcluster-bootstrap-docker-images#decision-task
image: "servobrowser/taskcluster-bootstrap:decision-task@sha256:28045b7ec0485ef363f8cb14f194008b47e9ede99f2ea40a1e945e921fce976e"
features:
taskclusterProxy: true
env:
GIT_URL: ${event.repository.clone_url}
GIT_REF: ${event.ref}
GIT_SHA: ${event.after}
TASK_FOR: ${tasks_for}
TASK_OWNER: *task_owner
TASK_SOURCE: *task_source
command:
- /bin/bash
- '--login'
- '-e'
- '-c'
- >-
git init repo &&
cd repo &&
git fetch --depth 1 "$GIT_URL" "$GIT_REF" &&
git reset --hard "$GIT_SHA" &&
python3 automation/taskcluster/decision_task.py