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