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/.
5 from taskgraph
.util
.schema
import Schema
, optionally_keyed_by
6 from voluptuous
import Any
, Optional
, Required
8 graph_config_schema
= Schema(
10 # The trust-domain for this graph.
11 # (See https://firefox-source-docs.mozilla.org/taskcluster/taskcluster/taskgraph.html#taskgraph-trust-domain) # noqa
12 Required("trust-domain"): str,
13 # This specifes the prefix for repo parameters that refer to the project being built.
14 # This selects between `head_rev` and `comm_head_rev` and related paramters.
15 # (See http://firefox-source-docs.mozilla.org/taskcluster/taskcluster/parameters.html#push-information # noqa
16 # and http://firefox-source-docs.mozilla.org/taskcluster/taskcluster/parameters.html#comm-push-information) # noqa
17 Required("project-repo-param-prefix"): str,
18 # This specifies the top level directory of the application being built.
19 # ie. "browser/" for Firefox, "comm/mail/" for Thunderbird.
20 Required("product-dir"): str,
21 Required("treeherder"): {
22 # Mapping of treeherder group symbols to descriptive names
23 Required("group-names"): {str: str}
25 Required("index"): {Required("products"): [str]},
27 # We have a few platforms for which we want to do some "extra" builds, or at
28 # least build-ish things. Sort of. Anyway, these other things are implemented
29 # as different "platforms". These do *not* automatically ride along with "-p
31 Required("ridealong-builds"): {str: [str]},
33 Required("release-promotion"): {
34 Required("products"): [str],
35 Required("flavors"): {
37 Required("product"): str,
38 Required("target-tasks-method"): str,
39 Optional("is-rc"): bool,
40 Optional("rebuild-kinds"): [str],
41 Optional("version-bump"): bool,
42 Optional("partial-updates"): bool,
46 Required("merge-automation"): {
47 Required("behaviors"): {
49 Optional("from-branch"): str,
50 Required("to-branch"): str,
51 Optional("from-repo"): str,
52 Required("to-repo"): str,
53 Required("version-files"): [
55 Required("filename"): str,
56 Optional("new-suffix"): str,
57 Optional("version-bump"): Any("major", "minor"),
60 Required("replacements"): [[str]],
61 Required("merge-old-head"): bool,
62 Optional("base-tag"): str,
63 Optional("end-tag"): str,
64 Optional("fetch-version-from"): str,
68 Required("scriptworker"): {
69 # Prefix to add to scopes controlling scriptworkers
70 Required("scope-prefix"): str,
72 Required("task-priority"): optionally_keyed_by(
84 Required("partner-urls"): {
85 Required("release-partner-repack"): optionally_keyed_by(
86 "release-product", "release-level", "release-type", Any(str, None)
88 Optional("release-partner-attribution"): optionally_keyed_by(
89 "release-product", "release-level", "release-type", Any(str, None)
91 Required("release-eme-free-repack"): optionally_keyed_by(
92 "release-product", "release-level", "release-type", Any(str, None)
95 Required("workers"): {
96 Required("aliases"): {
98 Required("provisioner"): optionally_keyed_by("level", str),
99 Required("implementation"): str,
101 Required("worker-type"): optionally_keyed_by(
102 "level", "release-level", "project", str
107 Required("mac-notarization"): {
108 Required("mac-entitlements"): optionally_keyed_by(
109 "platform", "release-level", str
111 Required("mac-requirements"): optionally_keyed_by("platform", str),
113 Required("taskgraph"): {
116 description
="Python function to call to register extensions.",
118 Optional("decision-parameters"): str,
120 Required("expiration-policy"): optionally_keyed_by("project", {str: str}),