Bug 1384729 - Move actions into taskgraph dir r=dustin

MozReview-Commit-ID: HK5MR8Xw3On

--HG--
rename : taskcluster/actions/__init__.py => taskcluster/taskgraph/actions/__init__.py
rename : taskcluster/actions/add-new-jobs.py => taskcluster/taskgraph/actions/add-new-jobs.py
rename : taskcluster/actions/hello-action.py => taskcluster/taskgraph/actions/hello-action.py
rename : taskcluster/actions/registry.py => taskcluster/taskgraph/actions/registry.py
rename : taskcluster/actions/retrigger.py => taskcluster/taskgraph/actions/retrigger.py
rename : taskcluster/actions/run_missing_tests.py => taskcluster/taskgraph/actions/run_missing_tests.py
rename : taskcluster/actions/test-retrigger-action.py => taskcluster/taskgraph/actions/test-retrigger-action.py
rename : taskcluster/actions/util.py => taskcluster/taskgraph/actions/util.py
extra : source : 9368bd8045136706950cde7cf718fda5492499e8
extra : histedit_source : f52597f12cb247124ee6080241ac9c741fc53e49
This commit is contained in:
Brian Stack 2017-07-27 10:47:37 -07:00
parent 6389867b7c
commit 257aa1c23c
11 changed files with 37 additions and 14 deletions

View File

@ -294,7 +294,7 @@ class MachCommands(MachCommandBase):
@SubCommand('taskgraph', 'action-callback',
description='Run action callback used by action tasks')
def action_callback(self, **options):
import actions
import taskgraph.actions
try:
self.setup_logging()
@ -305,7 +305,7 @@ class MachCommands(MachCommandBase):
callback = os.environ.get('ACTION_CALLBACK', None)
parameters = json.loads(os.environ.get('ACTION_PARAMETERS', '{}'))
return actions.trigger_action_callback(
return taskgraph.actions.trigger_action_callback(
task_group_id=task_group_id,
task_id=task_id,
task=task,
@ -336,7 +336,7 @@ class MachCommands(MachCommandBase):
def test_action_callback(self, **options):
import taskgraph.parameters
from taskgraph.util.taskcluster import get_task_definition
import actions
import taskgraph.actions
import yaml
def load_data(filename):
@ -366,7 +366,7 @@ class MachCommands(MachCommandBase):
parameters = taskgraph.parameters.load_parameters_file(options['parameters'])
parameters.check()
return actions.trigger_action_callback(
return taskgraph.actions.trigger_action_callback(
task_group_id=options['task_group_id'],
task_id=task_id,
task=task,

View File

@ -7,9 +7,6 @@
with Files('**'):
BUG_COMPONENT = ('Taskcluster', 'General')
with Files('actions/**'):
BUG_COMPONENT = ('Taskcluster', 'Task Configuration')
with Files('ci/**'):
BUG_COMPONENT = ('Taskcluster', 'Task Configuration')

View File

@ -1,7 +1,15 @@
# -*- coding: utf-8 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import, print_function, unicode_literals
from .registry import register_callback_action
from slugid import nice as slugid
from actions.util import create_task
from .util import create_task
from taskgraph.util.taskcluster import get_artifact
from taskgraph.util.parameterization import resolve_task_references
from taskgraph.taskgraph import TaskGraph

View File

@ -15,7 +15,7 @@ from types import FunctionType
from collections import namedtuple
from taskgraph.util.docker import docker_image
from taskgraph.parameters import Parameters
from actions import util
from . import util
GECKO = os.path.realpath(os.path.join(__file__, '..', '..', '..'))
@ -318,8 +318,8 @@ def _load():
# Load all modules from this folder, relying on the side-effects of register_
# functions to populate the action registry.
for f in os.listdir(os.path.dirname(__file__)):
if f.endswith('.py') and f not in ('__init__.py', 'registry.py'):
__import__('actions.' + f[:-3])
if f.endswith('.py') and f not in ('__init__.py', 'registry.py', 'util.py'):
__import__('taskgraph.actions.' + f[:-3])
return callbacks, actions

View File

@ -1,4 +1,12 @@
from registry import register_task_action
# -*- coding: utf-8 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import, print_function, unicode_literals
from .registry import register_task_action
@register_task_action(

View File

@ -10,7 +10,7 @@ import logging
from slugid import nice as slugid
from .registry import register_callback_action
from actions.util import create_task, find_decision_task
from .util import create_task, find_decision_task
from taskgraph.util.taskcluster import get_artifact
from taskgraph.util.parameterization import resolve_task_references
from taskgraph.taskgraph import TaskGraph

View File

@ -1,3 +1,11 @@
# -*- coding: utf-8 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import, print_function, unicode_literals
import copy
import json
import logging

View File

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -17,7 +17,7 @@ from .generator import TaskGraphGenerator
from .create import create_tasks
from .parameters import Parameters
from .taskgraph import TaskGraph
from actions import render_actions_json
from .actions import render_actions_json
from . import GECKO
from taskgraph.util.templates import Templates