2017-11-02 20:37:20 +03:00
|
|
|
# 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 __future__ import absolute_import, print_function, unicode_literals
|
|
|
|
|
|
|
|
from .util.schema import validate_schema, Schema
|
2018-01-09 02:27:32 +03:00
|
|
|
from voluptuous import Required
|
2017-11-02 20:37:20 +03:00
|
|
|
|
|
|
|
graph_config_schema = Schema({
|
2017-11-10 03:15:29 +03:00
|
|
|
# The trust-domain for this graph.
|
|
|
|
# (See https://firefox-source-docs.mozilla.org/taskcluster/taskcluster/taskgraph.html#taskgraph-trust-domain) # noqa
|
|
|
|
Required('trust-domain'): basestring,
|
2018-04-11 20:08:48 +03:00
|
|
|
# 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'): basestring,
|
2017-11-02 20:37:20 +03:00
|
|
|
Required('treeherder'): {
|
|
|
|
# Mapping of treeherder group symbols to descriptive names
|
|
|
|
Required('group-names'): {basestring: basestring}
|
2017-11-02 23:34:47 +03:00
|
|
|
},
|
2017-12-14 02:00:14 +03:00
|
|
|
Required('index'): {
|
2017-12-14 02:00:57 +03:00
|
|
|
Required('products'): [basestring],
|
2017-12-14 02:00:14 +03:00
|
|
|
},
|
2017-11-02 23:34:47 +03:00
|
|
|
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', default={}): {basestring: [basestring]},
|
|
|
|
},
|
2018-01-09 20:44:04 +03:00
|
|
|
Required('scriptworker'): {
|
2018-01-12 11:08:54 +03:00
|
|
|
# Prefix to add to scopes controlling scriptworkers
|
|
|
|
Required('scope-prefix'): basestring,
|
2018-01-09 20:44:04 +03:00
|
|
|
# Mapping of scriptworker types to scopes they accept
|
|
|
|
Required('worker-types'): {basestring: [basestring]}
|
|
|
|
},
|
2017-11-02 20:37:20 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
def validate_graph_config(config):
|
|
|
|
return validate_schema(graph_config_schema, config, "Invalid graph configuration:")
|