Bug 1258497: use taskgraph decision in decision task; r=gps

MozReview-Commit-ID: 9STbp4EPMrT

--HG--
extra : rebase_source : e46a41df3b0159fbbae2fc26ded576a3261fc870
extra : histedit_source : 4fe675a1bc33929e809ba3e2fe9373140eb4279d
This commit is contained in:
Dustin J. Mitchell 2016-05-16 22:42:10 +00:00
parent cea2249ca3
commit b79ac66e13
2 changed files with 14 additions and 24 deletions

View File

@ -5,6 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import, print_function, unicode_literals
from taskgraph import try_option_syntax
_target_task_methods = {}
def _target_task(name):
@ -28,8 +29,7 @@ def target_tasks_from_parameters(full_task_graph, parameters):
def target_tasks_try_option_syntax(full_task_graph, parameters):
"""Generate a list of target tasks based on try syntax in
parameters['message'] and, for context, the full task graph."""
from taskgraph.try_option_syntax import TryOptionSyntax
options = TryOptionSyntax(parameters['message'], full_task_graph)
options = try_option_syntax.TryOptionSyntax(parameters['message'], full_task_graph)
return [t.label for t in full_task_graph.tasks.itervalues()
if options.task_matches(t.attributes)]

View File

@ -25,8 +25,7 @@ tasks:
source: {{{source}}}
name: "[tc] Initial decision task for try"
description: |
This is the single most important task as it decides how all other tasks
get built.
Create the task-graph for a try push
workerType: "gecko-decision"
provisionerId: "aws-provisioner-v1"
@ -35,12 +34,11 @@ tasks:
createdForUser: {{owner}}
scopes:
- "docker-worker:cache:level-{{level}}-{{project}}-tc-vcs-public-sources"
- "docker-worker:cache:level-{{level}}-{{project}}-gecko-decision"
- "queue:route:tc-treeherder-stage.{{project}}.{{revision_hash}}"
- "queue:route:tc-treeherder.{{project}}.{{revision_hash}}"
- "scheduler:extend-task-graph:*"
# 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:
- "index.gecko.v2.{{project}}.latest.firefox.decision"
@ -81,32 +79,24 @@ tasks:
mkdir -p /home/worker/artifacts &&
checkout-gecko workspace &&
cd workspace/gecko &&
./mach taskcluster-graph
ln -s /home/worker/artifacts artifacts &&
./mach taskgraph decision
--target-tasks-method=try_option_syntax
--pushlog-id='{{pushlog_id}}'
--project='{{project}}'
--message='{{comment}}'
--owner='{{owner}}'
--level='{{level}}'
--base-repository='https://hg.mozilla.org/mozilla-central'
--head-repository='{{{url}}}'
--head-ref='{{revision}}'
--head-rev='{{revision}}'
--revision-hash='{{revision_hash}}'
--extend-graph > /home/worker/artifacts/graph.json &&
./mach taskcluster-graph
--pushlog-id='{{pushlog_id}}'
--project='{{project}}'
--message='try: -b do -p all -u all'
--owner='{{owner}}'
--revision-hash='{{revision_hash}}'
--extend-graph > /home/worker/artifacts/all_tasks.json
graphs:
- /home/worker/artifacts/graph.json
artifacts:
'public':
type: 'directory'
path: '/home/worker/artifacts'
# Arbitrary value for keeping these artifacts around. They are just the
# graph.json and context directories for now, so nothing that needs
# to stay around for long.
expires: '{{#from_now}}7 days{{/from_now}}'
extra: