[fenix] Closes https://github.com/mozilla-mobile/fenix/issues/24276: update paging...
[gecko.git] / mobile / android / fenix / taskcluster / fenix_taskgraph / parameters.py
blob937461e1140baf0ceb741791468dce9d57a97915
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 import os
7 from taskgraph.parameters import extend_parameters_schema
8 from voluptuous import All, Any, Optional, Range, Required
11 extend_parameters_schema(
13 Required("pull_request_number"): Any(All(int, Range(min=1)), None),
14 Required("release_type", default=""): str,
15 Optional("shipping_phase"): Any("build", "ship", None),
16 Required("version", default=""): str,
17 Required("next_version", default=""): Any(None, str),
22 def get_decision_parameters(graph_config, parameters):
23 parameters.setdefault("release_type", "")
24 head_tag = parameters["head_tag"]
25 parameters["version"] = head_tag[1:] if head_tag else ""
27 pr_number = os.environ.get("MOBILE_PULL_REQUEST_NUMBER", None)
28 parameters["pull_request_number"] = None if pr_number is None else int(pr_number)
29 parameters.setdefault("next_version", None)