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/.
7 from taskgraph
import config
as taskgraph_config
8 from taskgraph
import morph
as taskgraph_morph
9 from taskgraph
.util
import schema
10 from taskgraph
.util
import taskcluster
as tc_util
12 from gecko_taskgraph
.config
import graph_config_schema
14 GECKO
= os
.path
.normpath(os
.path
.realpath(os
.path
.join(__file__
, "..", "..", "..")))
16 # Maximum number of dependencies a single task can have
17 # https://firefox-ci-tc.services.mozilla.com/docs/reference/platform/queue/task-schema
18 # specifies 100, but we also optionally add the decision task id as a dep in
19 # taskgraph.create, so let's set this to 99.
22 # Overwrite Taskgraph's default graph_config_schema with a custom one.
23 taskgraph_config
.graph_config_schema
= graph_config_schema
25 # Don't use any of the upstream morphs.
26 # TODO Investigate merging our morphs with upstream.
27 taskgraph_morph
.registered_morphs
= []
29 # Default rootUrl to use if none is given in the environment; this should point
30 # to the production Taskcluster deployment used for CI.
31 tc_util
.PRODUCTION_TASKCLUSTER_ROOT_URL
= "https://firefox-ci-tc.services.mozilla.com"
33 # Schemas for YAML files should use dashed identifiers by default. If there are
34 # components of the schema for which there is a good reason to use another format,
35 # exceptions can be added here.
36 schema
.EXCEPTED_SCHEMA_IDENTIFIERS
.extend(
48 def register(graph_config
):
49 """Used to register Gecko specific extensions.
52 graph_config: The graph configuration object.
54 import android_taskgraph
55 from taskgraph
import generator
57 # TODO: Remove along with
58 # `gecko_taskgraph.optimize.strategies.SkipUnlessChanged`
59 # (see comment over there)
60 from taskgraph
.optimize
.base
import registry
62 del registry
["skip-unless-changed"]
64 from gecko_taskgraph
import ( # noqa: trigger target task method registration
65 morph
, # noqa: trigger morph registration
69 android_taskgraph
.register(graph_config
)
71 from gecko_taskgraph
.parameters
import register_parameters
72 from gecko_taskgraph
.util
import dependencies
# noqa: trigger group_by registration
73 from gecko_taskgraph
.util
.verify
import verifications
75 # Don't use the upstream verifications, and replace them with our own.
76 # TODO Investigate merging our verifications with upstream.
77 generator
.verifications
= verifications