Bug 1304019 - Add support for setting task's index rank r=dustin
[gecko.git] / .taskcluster.yml
blobb71ef866f2731da58c99608671df9502c0bcb613
1 ---
2 version: 0
3 metadata:
4   name: 'Taskcluster tasks for Gecko'
5   description: "The taskcluster task graph for Gecko trees"
6   owner: mozilla-taskcluster-maintenance@mozilla.com
7   source: {{{source}}}
9 scopes:
10   # Note the below scopes are insecure however these get overriden on the server
11   # side to whatever scopes are set by mozilla-taskcluster.
12   - queue:*
13   - docker-worker:*
14   - scheduler:*
16 # Available mustache parameters (see the mozilla-taskcluster source):
18 # - owner:          push user (email address)
19 # - source:         URL of this YAML file
20 # - url:            repository URL
21 # - project:        alias for the destination repository (basename of
22 #                   the repo url)
23 # - level:          SCM level of the destination repository
24 #                   (1 = try, 3 = core)
25 # - revision:       (short) hg revision of the head of the push
26 # - revision_hash:  (long) hg revision of the head of the push
27 # - comment:        comment of the push
28 # - pushlog_id:     id in the pushlog table of the repository
30 # and functions:
31 # - as_slugid:      convert a label into a slugId
32 # - from_now:       generate a timestamp at a fixed offset from now
34 # The resulting tasks' taskGroupId will be equal to the taskId of the first
35 # task listed here, which should be the decision task.  This gives other tools
36 # an easy way to determine the ID of the decision task that created a
37 # particular group.
39 tasks:
40   - taskId: '{{#as_slugid}}decision task{{/as_slugid}}'
41     task:
42       created: '{{now}}'
43       deadline: '{{#from_now}}1 day{{/from_now}}'
44       expires: '{{#from_now}}365 day{{/from_now}}'
45       metadata:
46         owner: mozilla-taskcluster-maintenance@mozilla.com
47         source: {{{source}}}
48         name: "Gecko Decision Task"
49         description: |
50             The task that creates all of the other tasks in the task graph
52       workerType: "gecko-decision"
53       provisionerId: "aws-provisioner-v1"
55       tags:
56         createdForUser: {{owner}}
58       scopes:
59         # Bug 1269443: cache scopes, etc. must be listed explicitly
60         - "docker-worker:cache:level-{{level}}-*"
61         - "docker-worker:cache:tooltool-cache"
62         # mozilla-taskcluster will append the appropriate assume:repo:<repo>
63         # scope here.
65       routes:
66         - "index.gecko.v2.{{project}}.latest.firefox.decision"
67         - "tc-treeherder.v2.{{project}}.{{revision}}.{{pushlog_id}}"
68         - "tc-treeherder-stage.v2.{{project}}.{{revision}}.{{pushlog_id}}"
70       payload:
71         env:
72           # checkout-gecko uses these to check out the source; the inputs
73           # to `mach taskgraph decision` are all on the command line.
74           GECKO_BASE_REPOSITORY: 'https://hg.mozilla.org/mozilla-unified'
75           GECKO_HEAD_REPOSITORY: '{{{url}}}'
76           GECKO_HEAD_REF: '{{revision}}'
77           GECKO_HEAD_REV: '{{revision}}'
79         cache:
80           level-{{level}}-hg-shared: /home/worker/hg-shared
81           level-{{level}}-checkouts: /home/worker/checkouts
83         features:
84           taskclusterProxy: true
86         # Note: This task is built server side without the context or tooling that
87         # exist in tree so we must hard code the version
88         image: 'taskcluster/decision:0.1.6'
90         maxRunTime: 1800
92         # TODO use mozilla-unified for the base repository once the tc-vcs
93         # tar.gz archives are created or tc-vcs isn't being used.
94         command:
95           - /home/worker/bin/run-task
96           - '--vcs-checkout=/home/worker/checkouts/gecko'
97           - '--'
98           - bash
99           - -cx
100           - >
101               cd /home/worker/checkouts/gecko &&
102               ln -s /home/worker/artifacts artifacts &&
103               ./mach --log-no-times taskgraph decision
104               --pushlog-id='{{pushlog_id}}'
105               --pushdate='{{pushdate}}'
106               --project='{{project}}'
107               --message={{#shellquote}}{{{comment}}}{{/shellquote}}
108               --owner='{{owner}}'
109               --level='{{level}}'
110               --base-repository='https://hg.mozilla.org/mozilla-central'
111               --head-repository='{{{url}}}'
112               --head-ref='{{revision}}'
113               --head-rev='{{revision}}'
114               --revision-hash='{{revision_hash}}'
116         artifacts:
117           'public':
118             type: 'directory'
119             path: '/home/worker/artifacts'
120             expires: '{{#from_now}}364 days{{/from_now}}'
121           'public/docker_image_contexts':
122             type: 'directory'
123             path: '/home/worker/docker_image_contexts'
124             expires: '{{#from_now}}7 days{{/from_now}}'
126       extra:
127         treeherder:
128           symbol: D