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
7 # sometimes the push user is just `ffxbld` or the like, but we want an email-like field..
8 ownerEmail: {$if: '"@" in push.owner', then: '${push.owner}', else: '${push.owner}@noreply.mozilla.org'}
9 # ensure there's no trailing `/` on the repo URL
10 repoUrl: {$if: 'repository.url[-1] == "/"', then: {$eval: 'repository.url[:-1]'}, else: {$eval: 'repository.url'}}
12 - taskId: '${as_slugid("decision")}'
13 taskGroupId: '${as_slugid("decision")}' # same as tsakId; this is how automation identifies a decision tsak
14 schedulerId: 'gecko-level-${repository.level}'
16 created: {$fromNow: ''}
17 deadline: {$fromNow: '1 day'}
18 expires: {$fromNow: '1 year 1 second'} # 1 second so artifacts expire first, despite rounding errors
21 - owner: "${ownerEmail}"
22 source: "${repoUrl}/raw-file/${push.revision}/.taskcluster.yml"
23 - $if: 'tasks_for == "hg-push"'
25 name: "Gecko Decision Task"
26 description: 'The task that creates all of the other tasks in the task graph'
28 name: "Decision Task for cron job ${cron.job_name}"
29 description: 'Created by a [cron task](https://tools.taskcluster.net/tasks/${cron.task_id})'
31 provisionerId: "aws-provisioner-v1"
32 workerType: "gecko-decision"
35 $if: 'tasks_for == "hg-push"'
36 then: {createdForUser: "${ownerEmail}"}
39 $if: 'tasks_for == "hg-push"'
41 - "index.gecko.v2.${repository.project}.latest.firefox.decision"
42 - "index.gecko.v2.${repository.project}.pushlog-id.${push.pushlog_id}.decision"
43 - "tc-treeherder.v2.${repository.project}.${push.revision}.${push.pushlog_id}"
44 - "tc-treeherder-stage.v2.${repository.project}.${push.revision}.${push.pushlog_id}"
45 - "notify.email.${ownerEmail}.on-failed"
46 - "notify.email.${ownerEmail}.on-exception"
48 - "index.gecko.v2.${repository.project}.latest.firefox.decision-${cron.job_name}"
49 - "tc-treeherder.v2.${repository.project}.${push.revision}.${push.pushlog_id}"
50 - "tc-treeherder-stage.v2.${repository.project}.${push.revision}.${push.pushlog_id}"
53 $if: 'tasks_for == "hg-push"'
55 - 'assume:repo:${repoUrl[8:]}:*'
56 - 'queue:route:notify.email.${ownerEmail}.*'
58 - 'assume:repo:${repoUrl[8:]}:cron:${cron.job_name}'
61 requires: all-completed
68 # checkout-gecko uses these to check out the source; the inputs
69 # to `mach taskgraph decision` are all on the command line.
70 GECKO_BASE_REPOSITORY: 'https://hg.mozilla.org/mozilla-unified'
71 GECKO_HEAD_REPOSITORY: '${repoUrl}'
72 GECKO_HEAD_REF: '${push.revision}'
73 GECKO_HEAD_REV: '${push.revision}'
74 GECKO_COMMIT_MSG: '${push.comment}'
75 HG_STORE_PATH: /home/worker/checkouts/hg-store
78 level-${repository.level}-checkouts: /home/worker/checkouts
81 taskclusterProxy: true
84 # Note: This task is built server side without the context or tooling that
85 # exist in tree so we must hard code the hash
86 # XXX Changing this will break Chain of Trust without an associated puppet and
88 image: 'taskcluster/decision:0.1.8@sha256:195d8439c8e90d59311d877bd2a8964849b2e43bfc6c234092618518d8b2891b'
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.
95 - /home/worker/bin/run-task
96 - '--vcs-checkout=/home/worker/checkouts/gecko'
101 extraArgs: {$if: 'tasks_for == "hg-push"', then: '', else: '${cron.quoted_args}'}
102 # NOTE: the explicit reference to mozilla-central below is required because android-stuff
103 # still uses tc-vcs, which does not support mozilla-unified
104 # https://bugzilla.mozilla.org/show_bug.cgi?id=1383973
106 cd /home/worker/checkouts/gecko &&
107 ln -s /home/worker/artifacts artifacts &&
108 ./mach --log-no-times taskgraph decision
109 --pushlog-id='${push.pushlog_id}'
110 --pushdate='${push.pushdate}'
111 --project='${repository.project}'
112 --message="$GECKO_COMMIT_MSG"
113 --owner='${ownerEmail}'
114 --level='${repository.level}'
115 --base-repository='https://hg.mozilla.org/mozilla-central'
116 --head-repository="$GECKO_HEAD_REPOSITORY"
117 --head-ref="$GECKO_HEAD_REF"
118 --head-rev="$GECKO_HEAD_REV"
124 path: '/home/worker/artifacts'
125 expires: {$fromNow: '1 year'}
129 $if: 'tasks_for == "hg-push"'
134 symbol: "${cron.job_symbol}"