__init__.py (2743B)
1 # This Source Code Form is subject to the terms of the Mozilla Public 2 # License, v. 2.0. If a copy of the MPL was not distributed with this 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 5 import os 6 7 from android_taskgraph import register as register_android_taskgraph 8 from mozilla_taskgraph import register as register_mozilla_taskgraph 9 from taskgraph import config as taskgraph_config 10 from taskgraph import generator 11 from taskgraph import morph as taskgraph_morph 12 from taskgraph.transforms.task import payload_builders 13 from taskgraph.util import schema 14 from taskgraph.util import taskcluster as tc_util 15 16 from gecko_taskgraph.config import graph_config_schema 17 18 GECKO = os.path.normpath(os.path.realpath(os.path.join(__file__, "..", "..", ".."))) 19 TEST_CONFIGS = os.path.join(GECKO, "taskcluster", "test_configs") 20 21 # Overwrite Taskgraph's default graph_config_schema with a custom one. 22 taskgraph_config.graph_config_schema = graph_config_schema 23 24 # Don't use any of the upstream morphs. 25 # TODO Investigate merging our morphs with upstream. 26 taskgraph_morph.registered_morphs = [] 27 28 # Default rootUrl to use if none is given in the environment; this should point 29 # to the production Taskcluster deployment used for CI. 30 tc_util.PRODUCTION_TASKCLUSTER_ROOT_URL = "https://firefox-ci-tc.services.mozilla.com" 31 32 # Schemas for YAML files should use dashed identifiers by default. If there are 33 # components of the schema for which there is a good reason to use another format, 34 # exceptions can be added here. 35 schema.EXCEPTED_SCHEMA_IDENTIFIERS.extend([ 36 "test_name", 37 "json_location", 38 "video_location", 39 "profile_name", 40 "target_path", 41 "try_task_config", 42 ]) 43 44 # TODO: These are temporarily redefined in gecko_taskgraph. Remove them from 45 # upstream until they can be consolidated. 46 del payload_builders["beetmover"] 47 del payload_builders["docker-worker"] 48 del payload_builders["generic-worker"] 49 50 51 def register(graph_config): 52 """Used to register Gecko specific extensions. 53 54 Args: 55 graph_config: The graph configuration object. 56 """ 57 from gecko_taskgraph import ( # noqa 58 filter_tasks, 59 morph, 60 target_tasks, # trigger target task method registration 61 ) 62 from gecko_taskgraph.parameters import register_parameters 63 from gecko_taskgraph.util import ( 64 dependencies, # noqa - trigger group_by registration 65 ) 66 from gecko_taskgraph.util.verify import verifications 67 68 register_mozilla_taskgraph(graph_config) 69 register_android_taskgraph(graph_config) 70 71 # Don't use the upstream verifications, and replace them with our own. 72 # TODO Investigate merging our verifications with upstream. 73 generator.verifications = verifications 74 75 register_parameters()