diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /comm/taskcluster/comm_taskgraph/parameters.py | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'comm/taskcluster/comm_taskgraph/parameters.py')
-rw-r--r-- | comm/taskcluster/comm_taskgraph/parameters.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/comm/taskcluster/comm_taskgraph/parameters.py b/comm/taskcluster/comm_taskgraph/parameters.py new file mode 100644 index 0000000000..a3cd3aebd5 --- /dev/null +++ b/comm/taskcluster/comm_taskgraph/parameters.py @@ -0,0 +1,42 @@ +# 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/. + +import logging + +from taskgraph.parameters import extend_parameters_schema +from voluptuous import Required + +from gecko_taskgraph.parameters import gecko_parameters_schema as comm_parameters_schema +from gecko_taskgraph.parameters import get_app_version, get_version + +logger = logging.getLogger(__name__) + + +# Called at import time when comm_taskgraph:register is called +comm_parameters_schema.update( + { + Required("comm_base_repository"): str, + Required("comm_base_ref"): str, + Required("comm_base_rev"): str, + Required("comm_head_ref"): str, + Required("comm_head_repository"): str, + Required("comm_head_rev"): str, + Required("comm_src_path"): str, + } +) + + +def get_defaults(repo_root=None): + return { + "app_version": get_app_version(product_dir="comm/mail"), + "version": get_version("comm/mail"), + "comm_src_path": "comm/", + } + + +def register_parameters(): + """Register the additional comm_* parameters with taskgraph. Note that + defaults_fn is registered, but it does not actually run by design in the + decision task due to 'strict' being True in that case.""" + extend_parameters_schema(comm_parameters_schema, defaults_fn=get_defaults) |