-
Notifications
You must be signed in to change notification settings - Fork 8
/
.taskcluster.yml
123 lines (108 loc) · 4.41 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
---
version: 0
metadata:
name: 'Taskcluster tasks for Goanna'
description: "The taskcluster task graph for Goanna trees"
owner: [email protected]
source: {{{source}}}
scopes:
# Note the below scopes are insecure however these get overriden on the server
# side to whatever scopes are set by mozilla-taskcluster.
- queue:*
- docker-worker:*
- scheduler:*
# This file undergoes substitution to create tasks. For on-push tasks, that
# substitution is done by mozilla-taskcluster. For cron tasks, that substitution
# is done by `taskcluster/taskgraph/cron/decision.py`. If you change any of the
# template parameters, please do so in all three places!
#
# Available template parameters:
#
# - now: current time
# - owner: push user (email address)
# - source: URL of this YAML file
# - url: repository URL
# - project: alias for the destination repository (basename of
# the repo url)
# - level: SCM level of the destination repository
# (1 = try, 3 = core)
# - revision: hg revision of the head of the push
# - comment: comment of the push
# - pushlog_id: id in the pushlog table of the repository
#
# and functions:
# - as_slugid: convert a label into a slugId
# - from_now: generate a timestamp at a fixed offset from now
# - shellquote: quote the contents for injection into shell
# The resulting tasks' taskGroupId will be equal to the taskId of the first
# task listed here, which should be the decision task. This gives other tools
# an easy way to determine the ID of the decision task that created a
# particular group.
tasks:
- taskId: '{{#as_slugid}}decision task{{/as_slugid}}'
task:
created: '{{now}}'
deadline: '{{#from_now}}1 day{{/from_now}}'
expires: '{{#from_now}}365 day{{/from_now}}'
metadata:
owner: [email protected]
source: {{{source}}}
name: "Goanna Decision Task"
description: |
The task that creates all of the other tasks in the task graph
workerType: "goanna-decision"
provisionerId: "aws-provisioner-v1"
tags:
createdForUser: {{owner}}
routes:
- "index.goanna.v2.{{project}}.latest.firefox.decision"
- "tc-treeherder.v2.{{project}}.{{revision}}.{{pushlog_id}}"
- "tc-treeherder-stage.v2.{{project}}.{{revision}}.{{pushlog_id}}"
payload:
env:
# checkout-goanna uses these to check out the source; the inputs
# to `mach taskgraph decision` are all on the command line.
GOANNA_BASE_REPOSITORY: 'https://hg.mozilla.org/mozilla-unified'
GOANNA_HEAD_REPOSITORY: '{{{url}}}'
GOANNA_HEAD_REF: '{{revision}}'
GOANNA_HEAD_REV: '{{revision}}'
HG_STORE_PATH: /home/worker/checkouts/hg-store
cache:
level-{{level}}-checkouts: /home/worker/checkouts
features:
taskclusterProxy: true
chainOfTrust: true
# Note: This task is built server side without the context or tooling that
# exist in tree so we must hard code the hash
image: 'taskcluster/decision@sha256:0f59f922d86c471e208b7ea08ab077fc68c3920ed5e6895d69a23e8f3457dc24'
maxRunTime: 1800
# TODO use mozilla-unified for the base repository once the tc-vcs
# tar.gz archives are created or tc-vcs isn't being used.
command:
- /home/worker/bin/run-task
- '--vcs-checkout=/home/worker/checkouts/goanna'
- '--'
- bash
- -cx
- >
cd /home/worker/checkouts/goanna &&
ln -s /home/worker/artifacts artifacts &&
./mach --log-no-times taskgraph decision
--pushlog-id='{{pushlog_id}}'
--pushdate='{{pushdate}}'
--project='{{project}}'
--message={{#shellquote}}{{{comment}}}{{/shellquote}}
--owner='{{owner}}'
--level='{{level}}'
--base-repository='https://hg.mozilla.org/mozilla-central'
--head-repository='{{{url}}}'
--head-ref='{{revision}}'
--head-rev='{{revision}}'
artifacts:
'public':
type: 'directory'
path: '/home/worker/artifacts'
expires: '{{#from_now}}364 days{{/from_now}}'
extra:
treeherder:
symbol: D