config.py (5090B)
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 from taskgraph.util.schema import Schema, optionally_keyed_by 6 from voluptuous import All, Any, Extra, Optional, Required 7 from voluptuous.validators import Length 8 9 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: Length(max=100)} 24 }, 25 Required("index"): {Required("products"): [str]}, 26 Required("try"): { 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 30 # all" 31 Required("ridealong-builds"): {str: [str]}, 32 }, 33 Required("release-promotion"): { 34 Required("products"): [str], 35 Required("flavors"): { 36 str: { 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, 43 } 44 }, 45 Optional("rebuild-kinds"): [str], 46 }, 47 Required("scriptworker"): { 48 # Prefix to add to scopes controlling scriptworkers 49 Required("scope-prefix"): str, 50 }, 51 Required("task-priority"): optionally_keyed_by( 52 "project", 53 Any( 54 "highest", 55 "very-high", 56 "high", 57 "medium", 58 "low", 59 "very-low", 60 "lowest", 61 ), 62 ), 63 Required("partner-urls"): { 64 Required("release-partner-repack"): optionally_keyed_by( 65 "release-product", "release-level", "release-type", Any(str, None) 66 ), 67 Optional("release-partner-attribution"): optionally_keyed_by( 68 "release-product", "release-level", "release-type", Any(str, None) 69 ), 70 Required("release-eme-free-repack"): optionally_keyed_by( 71 "release-product", "release-level", "release-type", Any(str, None) 72 ), 73 }, 74 Required("workers"): { 75 Required("aliases"): { 76 str: { 77 Required("provisioner"): optionally_keyed_by("level", str), 78 Required("implementation"): str, 79 Required("os"): str, 80 Required("worker-type"): optionally_keyed_by( 81 "level", "release-level", "project", str 82 ), 83 } 84 }, 85 }, 86 Required("mac-signing"): { 87 Required("mac-requirements"): optionally_keyed_by("platform", str), 88 Required("hardened-sign-config"): optionally_keyed_by( 89 "hardened-signing-type", 90 [ 91 { 92 Optional("deep"): bool, 93 Optional("runtime"): bool, 94 Optional("force"): bool, 95 Optional("requirements"): optionally_keyed_by( 96 "release-product", "release-level", str 97 ), 98 Optional("entitlements"): optionally_keyed_by( 99 "build-platform", "project", str 100 ), 101 Required("globs"): [str], 102 } 103 ], 104 ), 105 }, 106 Required("taskgraph"): { 107 Optional( 108 "register", 109 description="Python function to call to register extensions.", 110 ): str, 111 Optional("decision-parameters"): str, 112 Optional("run"): { 113 Optional("use-caches"): Any(bool, [str]), 114 }, 115 Required("repositories"): All( 116 { 117 str: { 118 Required("name"): str, 119 Optional("project-regex"): str, 120 Optional("ssh-secret-name"): str, 121 Extra: str, 122 } 123 }, 124 Length(min=1), 125 ), 126 }, 127 Required("expiration-policy"): optionally_keyed_by("project", "level", {str: str}), 128 })