Bug 1486801 - Clicking on the [...] should expand the markup container. r=jdescottes
[gecko.git] / .taskcluster.yml
blobf5ce9752aba1466c0844a540eb8d04e7971cf8ec
1 # This file is rendered via JSON-e by
2 # - mozilla-taskcluster - https://docs.taskcluster.net/reference/integrations/mozilla-taskcluster/docs/taskcluster-yml
3 # - cron tasks - taskcluster/taskgraph/cron/decision.py
4 # - action tasks - taskcluster/taskgraph/actions/registry.py
5 version: 1
6 tasks:
7   # NOTE: support for actions in ci-admin requires that the `tasks` property be an array *before* JSON-e rendering
8   # takes place.
9   - $if: 'tasks_for in ["hg-push", "action", "cron"]'
10     then:
11       $let:
12         # sometimes the push user is just `ffxbld` or the like, but we want an email-like field..
13         ownerEmail: {$if: '"@" in push.owner', then: '${push.owner}', else: '${push.owner}@noreply.mozilla.org'}
14         # ensure there's no trailing `/` on the repo URL
15         repoUrl: {$if: 'repository.url[-1] == "/"', then: {$eval: 'repository.url[:-1]'}, else: {$eval: 'repository.url'}}
16       in:
17         taskId: {$if: 'tasks_for != "action"', then: '${as_slugid("decision")}'}
18         taskGroupId:
19           $if: 'tasks_for == "action"'
20           then:
21             '${action.taskGroupId}'
22           else:
23             '${as_slugid("decision")}' # same as taskId; this is how automation identifies a decision tsak
24         schedulerId: 'gecko-level-${repository.level}'
26         created: {$fromNow: ''}
27         deadline: {$fromNow: '1 day'}
28         expires: {$fromNow: '1 year 1 second'} # 1 second so artifacts expire first, despite rounding errors
29         metadata:
30           $merge:
31             - owner: "${ownerEmail}"
32               source: "${repoUrl}/raw-file/${push.revision}/.taskcluster.yml"
33             - $if: 'tasks_for == "hg-push"'
34               then:
35                 name: "Gecko Decision Task"
36                 description: 'The task that creates all of the other tasks in the task graph'
37               else:
38                 $if: 'tasks_for == "action"'
39                 then:
40                   name: "Action: ${action.title}"
41                   description: '${action.description}'
42                 else:
43                   name: "Decision Task for cron job ${cron.job_name}"
44                   description: 'Created by a [cron task](https://tools.taskcluster.net/tasks/${cron.task_id})'
46         provisionerId: "aws-provisioner-v1"
47         workerType: "gecko-${repository.level}-decision"
49         tags:
50           $if: 'tasks_for == "hg-push"'
51           then:
52             createdForUser: "${ownerEmail}"
53             kind: decision-task
54           else:
55             $if: 'tasks_for == "action"'
56             then:
57               createdForUser: '${ownerEmail}'
58               kind: 'action-callback'
59             else:
60               $if: 'tasks_for == "cron"'
61               then:
62                 kind: cron-task
64         routes:
65           $flatten:
66             - "tc-treeherder.v2.${repository.project}.${push.revision}.${push.pushlog_id}"
67             - $if: 'tasks_for == "hg-push"'
68               then:
69                 - "index.gecko.v2.${repository.project}.latest.taskgraph.decision"
70                 - "index.gecko.v2.${repository.project}.revision.${push.revision}.taskgraph.decision"
71                 - "index.gecko.v2.${repository.project}.pushlog-id.${push.pushlog_id}.decision"
72                 - "notify.email.${ownerEmail}.on-failed"
73                 - "notify.email.${ownerEmail}.on-exception"
74                 # These are the old index routes for the decision task.
75                 # They are still here so external tools that referenced them continue to work.
76                 - "index.gecko.v2.${repository.project}.latest.firefox.decision"
77                 - "index.gecko.v2.${repository.project}.revision.${push.revision}.firefox.decision"
78               else:
79                 $if: 'tasks_for == "action"'
80                 then:
81                 - "notify.email.taskcluster-notifications+action-task@mozilla.com.on-failed"
82                 - "notify.email.taskcluster-notifications+action-task@mozilla.com.on-exception"
83                 - "index.gecko.v2.${repository.project}.pushlog-id.${push.pushlog_id}.actions.${ownTaskId}"
84                 else:  # cron
85                 - "index.gecko.v2.${repository.project}.latest.taskgraph.decision-${cron.job_name}"
86                 - "index.gecko.v2.${repository.project}.latest.firefox.decision-${cron.job_name}"
88         scopes:
89           $if: 'tasks_for == "hg-push"'
90           then:
91             - 'assume:repo:${repoUrl[8:]}:branch:default'
92             - 'queue:route:notify.email.${ownerEmail}.*'
93             - 'in-tree:hook-action:project-gecko/in-tree-action-${repository.level}-*'
94           else:
95             $if: 'tasks_for == "action"'
96             then:
97               # when all actions are hooks, we can calculate this directly rather than using a variable
98               - '${action.repo_scope}'
99             else:
100               - 'assume:repo:${repoUrl[8:]}:cron:${cron.job_name}'
102         dependencies: []
103         requires: all-completed
105         priority: lowest
106         retries: 5
108         payload:
109           env:
110             # checkout-gecko uses these to check out the source; the inputs
111             # to `mach taskgraph decision` are all on the command line.
112             $merge:
113               - GECKO_BASE_REPOSITORY: 'https://hg.mozilla.org/mozilla-unified'
114                 GECKO_HEAD_REPOSITORY: '${repoUrl}'
115                 GECKO_HEAD_REF: '${push.revision}'
116                 GECKO_HEAD_REV: '${push.revision}'
117                 GECKO_COMMIT_MSG: {$if: 'tasks_for != "action"', then: '${push.comment}'}
118                 HG_STORE_PATH: /builds/worker/checkouts/hg-store
119                 TASKCLUSTER_CACHES: /builds/worker/checkouts
120               - $if: 'tasks_for == "action"'
121                 then:
122                   ACTION_TASK_GROUP_ID: '${taskGroupId}'     # taskGroupId of the target task
123                   ACTION_TASK_ID: {$json: {$eval: 'taskId'}} # taskId of the target task (JSON-encoded)
124                   ACTION_INPUT: {$json: {$eval: 'input'}}
125                   ACTION_CALLBACK: '${action.cb_name}'
126                   ACTION_PARAMETERS: {$json: {$eval: 'parameters'}}
128           cache:
129             level-${repository.level}-checkouts-sparse-v2: /builds/worker/checkouts
131           features:
132             taskclusterProxy: true
133             chainOfTrust: true
135           # Note: This task is built server side without the context or tooling that
136           # exist in tree so we must hard code the hash
137           image: 'taskcluster/decision:2.1.0@sha256:6db3b697d7a3c7aba440d72f04199331b872111cefff57206b8b8b1d53230360'
139           maxRunTime: 1800
141           command:
142             - /builds/worker/bin/run-task
143             - '--vcs-checkout=/builds/worker/checkouts/gecko'
144             - '--sparse-profile=build/sparse-profiles/taskgraph'
145             - '--'
146             - bash
147             - -cx
148             - $let:
149                 extraArgs: {$if: 'tasks_for == "cron"', then: '${cron.quoted_args}', else: ''}
150               in:
151                 $if: 'tasks_for == "action"'
152                 then: >
153                   cd /builds/worker/checkouts/gecko &&
154                   ln -s /builds/worker/artifacts artifacts &&
155                   ./mach --log-no-times taskgraph action-callback
156                 else: >
157                   cd /builds/worker/checkouts/gecko &&
158                   ln -s /builds/worker/artifacts artifacts &&
159                   ./mach --log-no-times taskgraph decision
160                   --pushlog-id='${push.pushlog_id}'
161                   --pushdate='${push.pushdate}'
162                   --project='${repository.project}'
163                   --message="$GECKO_COMMIT_MSG"
164                   --owner='${ownerEmail}'
165                   --level='${repository.level}'
166                   --base-repository="$GECKO_BASE_REPOSITORY"
167                   --head-repository="$GECKO_HEAD_REPOSITORY"
168                   --head-ref="$GECKO_HEAD_REF"
169                   --head-rev="$GECKO_HEAD_REV"
170                   ${extraArgs}
172           artifacts:
173             'public':
174               type: 'directory'
175               path: '/builds/worker/artifacts'
176               expires: {$fromNow: '1 year'}
178         extra:
179           $merge:
180             - treeherder:
181                 $merge:
182                   - machine:
183                       platform: gecko-decision
184                   - $if: 'tasks_for == "hg-push"'
185                     then:
186                       symbol: D
187                     else:
188                       $if: 'tasks_for == "action"'
189                       then:
190                         groupName: 'action-callback'
191                         groupSymbol: AC
192                         symbol: "${action.symbol}"
193                       else:
194                         groupSymbol: cron
195                         symbol: "${cron.job_symbol}"
196             - $if: 'tasks_for == "action"'
197               then:
198                 parent: '${action.taskGroupId}'
199                 action:
200                   name: '${action.name}'
201                   context:
202                     taskGroupId: '${action.taskGroupId}'
203                     taskId: {$eval: 'taskId'}
204                     input: {$eval: 'input'}
205                     parameters: {$eval: 'parameters'}
206             - $if: 'tasks_for == "cron"'
207               then:
208                 cron: {$json: {$eval: 'cron'}}
209             - tasks_for: '${tasks_for}'