Let taskgraph load tasks for pushes
parent
2a4f48109d
commit
d26ef6087d
|
@ -84,7 +84,7 @@ tasks:
|
|||
else:
|
||||
$if: 'tasks_for in ["cron", "action"]'
|
||||
then: '${repository.level}'
|
||||
else: 1
|
||||
else: '1'
|
||||
in:
|
||||
taskId: '${ownTaskId}'
|
||||
taskGroupId:
|
||||
|
@ -130,7 +130,7 @@ tasks:
|
|||
routes:
|
||||
$flatten:
|
||||
- checks
|
||||
- $if: 'tasks_for != "github-pull-request"'
|
||||
- $if: 'level == "3"'
|
||||
then:
|
||||
- "tc-treeherder.v2.${project}.${head_sha}"
|
||||
else: []
|
||||
|
|
|
@ -45,10 +45,8 @@ def pr(builder):
|
|||
|
||||
|
||||
def push(builder):
|
||||
all_tasks = pr()
|
||||
other_tasks = all_tasks[-1]
|
||||
other_tasks[_generate_slug_id()] = builder.craft_ui_tests_task()
|
||||
|
||||
all_tasks = pr(builder)
|
||||
all_tasks.append(builder.craft_ui_tests_task())
|
||||
return all_tasks
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ current_dir = os.path.dirname(os.path.realpath(__file__))
|
|||
project_dir = os.path.realpath(os.path.join(current_dir, '..', '..', '..'))
|
||||
sys.path.append(project_dir)
|
||||
|
||||
from automation.taskcluster.decision_task import pr
|
||||
from automation.taskcluster.decision_task import pr, push
|
||||
from automation.taskcluster.lib.tasks import TaskBuilder
|
||||
|
||||
|
||||
|
@ -37,6 +37,8 @@ def loader(kind, path, config, params, loaded_tasks):
|
|||
tasks_for = params['tasks_for']
|
||||
if tasks_for == 'github-pull-request':
|
||||
ordered_groups_of_tasks = pr(builder)
|
||||
elif tasks_for == 'github-push':
|
||||
ordered_groups_of_tasks = push(builder)
|
||||
else:
|
||||
raise NotImplementedError('Unsupported tasks_for "{}"'.format(tasks_for))
|
||||
|
||||
|
|
Loading…
Reference in New Issue