gecko-dev/taskcluster/taskgraph/action.yml
Gregory Szorc 66dab0495d Bug 1290620 - Use run-task from decision task; r=dustin
This commit does a lot. But it's really not too difficult to comprehend
once you focus on the final state, which is basically the same as the
"lint" image and derived tasks.

Before, the "decision" image contained a "checkout-gecko" script and
"run-action" and "run-decision" scripts. The latter 2 invoked the first
script.

The "run-task" script basically does what the combination of these
scripts were doing before. So we switch to it.

While we're here, we also replaced the custom Mercurial installation in
this image with the shared install-mercurial.sh script. The
system-setup.sh script for the decision image is now short and sweet.

The YAML files for tasks using this image have been updated to use
"run-task." We no longer have to pass an environment variable to hold
command arguments. So we revert to putting these arguments inline in
the task's command. Dustin never liked passing the arguments as
environment variables, so it should make him happy ;) We add
--log-no-times because "run-task" prefixes its own timestamps on output
lines.

The path to the Gecko checkout has been changed from
/home/worker/workspace to /home/worker/checkouts to match changes made
in bug 1289643.

Finally, since "checkout-gecko-and-run" is no longer used, we delete it.

The Docker image version has been bumped accordingly.

MozReview-Commit-ID: HAGuCz6668Q

--HG--
extra : rebase_source : 9586873c21d67f8ce869b7ceee221e8fa8775539
2016-07-29 21:03:48 -07:00

74 lines
2.1 KiB
YAML

---
created: '{{now}}'
deadline: '{{#from_now}}1 day{{/from_now}}'
expires: '{{#from_now}}14 day{{/from_now}}'
metadata:
owner: mozilla-taskcluster-maintenance@mozilla.com
source: 'https://hg.mozilla.org/{{project}}/file/{{head_rev}}/taskcluster/taskgraph/action.yml'
name: "[tc] Action Task"
description: Helps schedule new jobs without new push
workerType: "gecko-decision"
provisionerId: "aws-provisioner-v1"
tags:
createdForUser: {{owner}}
scopes:
# Bug 1269443: cache scopes, etc. must be listed explicitly
- "docker-worker:cache:level-1-*"
- "docker-worker:cache:tooltool-cache"
- "secrets:get:project/taskcluster/gecko/hgfingerprint"
- "assume:repo:hg.mozilla.org/try:*"
routes:
- "tc-treeherder.v2.{{project}}.{{head_rev}}.{{pushlog_id}}"
- "tc-treeherder-stage.v2.{{project}}.{{head_rev}}.{{pushlog_id}}"
payload:
env:
GECKO_BASE_REPOSITORY: 'https://hg.mozilla.org/mozilla-unified'
GECKO_HEAD_REPOSITORY: '{{{head_repository}}}'
GECKO_HEAD_REF: '{{head_ref}}'
GECKO_HEAD_REV: '{{head_rev}}'
cache:
level-{{level}}-hg-shared: /home/worker/hg-shared
level-{{level}}-checkouts: /home/worker/checkouts
features:
taskclusterProxy: true
# Note: This task is built server side without the context or tooling that
# exist in tree so we must hard code the version
image: 'taskcluster/decision:0.1.3'
# Virtually no network or other potentially risky operations happen as part
# of the task timeout aside from the initial clone. We intentionally have
# set this to a lower value _all_ decision tasks should use a root
# repository which is cached.
maxRunTime: 1800
command:
- /home/worker/bin/run-task
- '--vcs-checkout=/home/worker/checkouts/gecko'
- '--'
- bash
- -cx
- >
cd /home/worker/checkouts/gecko &&
ln -s /home/worker/artifacts artifacts &&
./mach --log-no-times taskgraph action-task
--decision-id='{{decision_task_id}}'
--task-label='{{task_labels}}'
artifacts:
'public':
type: 'directory'
path: '/home/worker/artifacts'
expires: '{{#from_now}}7 days{{/from_now}}'
extra:
treeherder:
symbol: A