From d26ef6087dbe38cfceaeb20634debe4d4c5d4507 Mon Sep 17 00:00:00 2001 From: Johan Lorenzo Date: Fri, 13 Sep 2019 08:19:42 +0200 Subject: [PATCH] Let taskgraph load tasks for pushes --- .taskcluster.yml | 4 ++-- automation/taskcluster/decision_task.py | 6 ++---- taskcluster/fenix_taskgraph/loader/old_decision.py | 4 +++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.taskcluster.yml b/.taskcluster.yml index bfc755f63..0b3734a33 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -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: [] diff --git a/automation/taskcluster/decision_task.py b/automation/taskcluster/decision_task.py index cab290c2a..fcfb1abfb 100644 --- a/automation/taskcluster/decision_task.py +++ b/automation/taskcluster/decision_task.py @@ -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 diff --git a/taskcluster/fenix_taskgraph/loader/old_decision.py b/taskcluster/fenix_taskgraph/loader/old_decision.py index 9963a4ce6..05685f5f6 100644 --- a/taskcluster/fenix_taskgraph/loader/old_decision.py +++ b/taskcluster/fenix_taskgraph/loader/old_decision.py @@ -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))