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,
45 Optional("rebuild-kinds"): [str],
47 Required("merge-automation"): {
48 Required("behaviors"): {
50 Optional("from-branch"): str,
51 Required("to-branch"): str,
52 Optional("from-repo"): str,
53 Required("to-repo"): str,
54 Required("version-files"): [
56 Required("filename"): str,
57 Optional("new-suffix"): str,
58 Optional("version-bump"): Any("major", "minor"),
61 Required("replacements"): [[str]],
62 Required("merge-old-head"): bool,
63 Optional("base-tag"): str,
64 Optional("end-tag"): str,
65 Optional("fetch-version-from"): str,
69 Required("scriptworker"): {
70 # Prefix to add to scopes controlling scriptworkers
71 Required("scope-prefix"): str,
73 Required("task-priority"): optionally_keyed_by(
85 Required("partner-urls"): {
86 Required("release-partner-repack"): optionally_keyed_by(
87 "release-product", "release-level", "release-type", Any(str, None)
89 Optional("release-partner-attribution"): optionally_keyed_by(
90 "release-product", "release-level", "release-type", Any(str, None)
92 Required("release-eme-free-repack"): optionally_keyed_by(
93 "release-product", "release-level", "release-type", Any(str, None)
96 Required("workers"): {
97 Required("aliases"): {
99 Required("provisioner"): optionally_keyed_by("level", str),
100 Required("implementation"): str,
102 Required("worker-type"): optionally_keyed_by(
103 "level", "release-level", "project", str
108 Required("mac-signing"): {
109 Required("mac-requirements"): optionally_keyed_by("platform", str),
110 Required("hardened-sign-config"): optionally_keyed_by(
111 "hardened-signing-type",
114 Optional("deep"): bool,
115 Optional("runtime"): bool,
116 Optional("force"): bool,
117 Optional("requirements"): optionally_keyed_by(
118 "release-product", "release-level", str
120 Optional("entitlements"): optionally_keyed_by(
121 "build-platform", "project", str
123 Required("globs"): [str],
128 Required("taskgraph"): {
131 description
="Python function to call to register extensions.",
133 Optional("decision-parameters"): str,
135 Required("expiration-policy"): optionally_keyed_by("project", {str: str}),