File: config.py

package info (click to toggle)
firefox 149.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,767,760 kB
  • sloc: cpp: 7,416,064; javascript: 6,752,859; ansic: 3,774,850; python: 1,250,473; xml: 641,578; asm: 439,191; java: 186,617; sh: 56,634; makefile: 18,856; objc: 13,092; perl: 12,763; pascal: 5,960; yacc: 4,583; cs: 3,846; lex: 1,720; ruby: 1,002; php: 436; lisp: 258; awk: 105; sql: 66; sed: 53; csh: 10; exp: 6
file content (133 lines) | stat: -rw-r--r-- 5,301 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# 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 taskgraph.util.schema import LegacySchema, optionally_keyed_by
from voluptuous import All, Any, Extra, Optional, Required
from voluptuous.validators import Length

graph_config_schema = LegacySchema({
    # The trust-domain for this graph.
    # (See https://firefox-source-docs.mozilla.org/taskcluster/taskcluster/taskgraph.html#taskgraph-trust-domain)  # noqa
    Required("trust-domain"): str,
    # This specifes the prefix for repo parameters that refer to the project being built.
    # This selects between `head_rev` and `comm_head_rev` and related paramters.
    # (See http://firefox-source-docs.mozilla.org/taskcluster/taskcluster/parameters.html#push-information  # noqa
    # and http://firefox-source-docs.mozilla.org/taskcluster/taskcluster/parameters.html#comm-push-information)  # noqa
    Required("project-repo-param-prefix"): str,
    # This specifies the top level directory of the application being built.
    # ie. "browser/" for Firefox, "comm/mail/" for Thunderbird.
    Required("product-dir"): str,
    Required("treeherder"): {
        # Mapping of treeherder group symbols to descriptive names
        Required("group-names"): {str: Length(max=100)},
        # Mapping of head branch name to Treeherder project
        Optional("branch-map"): optionally_keyed_by(
            "project",
            {str: str},
        ),
    },
    Required("index"): {Required("products"): [str]},
    Required("try"): {
        # We have a few platforms for which we want to do some "extra" builds, or at
        # least build-ish things.  Sort of.  Anyway, these other things are implemented
        # as different "platforms".  These do *not* automatically ride along with "-p
        # all"
        Required("ridealong-builds"): {str: [str]},
    },
    Required("release-promotion"): {
        Required("products"): [str],
        Required("flavors"): {
            str: {
                Required("product"): str,
                Required("target-tasks-method"): str,
                Optional("rebuild-kinds"): [str],
                Optional("version-bump"): bool,
                Optional("partial-updates"): bool,
            }
        },
        Optional("rebuild-kinds"): [str],
    },
    Required("scriptworker"): {
        # Prefix to add to scopes controlling scriptworkers
        Required("scope-prefix"): str,
    },
    Required("task-priority"): optionally_keyed_by(
        "project",
        Any(
            "highest",
            "very-high",
            "high",
            "medium",
            "low",
            "very-low",
            "lowest",
        ),
    ),
    Required("partner-urls"): {
        Required("release-partner-repack"): optionally_keyed_by(
            "release-product", "release-level", "release-type", Any(str, None)
        ),
        Optional("release-partner-attribution"): optionally_keyed_by(
            "release-product", "release-level", "release-type", Any(str, None)
        ),
        Required("release-eme-free-repack"): optionally_keyed_by(
            "release-product", "release-level", "release-type", Any(str, None)
        ),
    },
    Required("workers"): {
        Required("aliases"): {
            str: {
                Required("provisioner"): optionally_keyed_by("level", str),
                Required("implementation"): str,
                Required("os"): str,
                Required("worker-type"): optionally_keyed_by(
                    "level", "release-level", "project", str
                ),
            }
        },
    },
    Required("mac-signing"): {
        Required("mac-requirements"): optionally_keyed_by("platform", str),
        Required("hardened-sign-config"): optionally_keyed_by(
            "hardened-signing-type",
            [
                {
                    Optional("deep"): bool,
                    Optional("runtime"): bool,
                    Optional("force"): bool,
                    Optional("requirements"): optionally_keyed_by(
                        "release-product", "release-level", str
                    ),
                    Optional("entitlements"): optionally_keyed_by(
                        "build-platform", "project", str
                    ),
                    Required("globs"): [str],
                    Optional("only-if-milestone-is-nightly"): bool,
                }
            ],
        ),
    },
    Required("taskgraph"): {
        Optional(
            "register",
            description="Python function to call to register extensions.",
        ): str,
        Optional("decision-parameters"): str,
        Optional("run"): {
            Optional("use-caches"): Any(bool, [str]),
        },
        Required("repositories"): All(
            {
                str: {
                    Required("name"): str,
                    Optional("project-regex"): str,
                    Optional("ssh-secret-name"): str,
                    Extra: str,
                }
            },
            Length(min=1),
        ),
    },
    Required("expiration-policy"): optionally_keyed_by("project", "level", {str: str}),
})