summaryrefslogtreecommitdiffstats
path: root/comm/taskcluster/comm_taskgraph/actions.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
commit9e3c08db40b8916968b9f30096c7be3f00ce9647 (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /comm/taskcluster/comm_taskgraph/actions.py
parentInitial commit. (diff)
downloadthunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.tar.xz
thunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.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/actions.py')
-rw-r--r--comm/taskcluster/comm_taskgraph/actions.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/comm/taskcluster/comm_taskgraph/actions.py b/comm/taskcluster/comm_taskgraph/actions.py
new file mode 100644
index 0000000000..6095f3e6c8
--- /dev/null
+++ b/comm/taskcluster/comm_taskgraph/actions.py
@@ -0,0 +1,38 @@
+# 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 gecko_taskgraph.actions.registry import register_callback_action
+from gecko_taskgraph.actions.util import create_tasks, fetch_graph_and_labels
+from gecko_taskgraph.util.attributes import RELEASE_PROMOTION_PROJECTS
+
+
+def is_release_promotion_available(parameters):
+ return parameters["project"] in RELEASE_PROMOTION_PROJECTS
+
+
+@register_callback_action(
+ name="l10n-bump",
+ title="L10n Bumper Automation",
+ symbol="l10n_bump",
+ description="L10n bumper action.",
+ order=500,
+ context=[],
+ available=is_release_promotion_available,
+)
+def l10n_bump_action(parameters, graph_config, _input, task_group_id, task_id):
+ """
+ Runs the 'l10n_bump' task.
+ """
+ decision_task_id, full_task_graph, label_to_taskid = fetch_graph_and_labels(
+ parameters, graph_config
+ )
+ to_run = [label for label, entry in full_task_graph.tasks.items() if "l10n-bump" in entry.kind]
+ create_tasks(
+ graph_config,
+ to_run,
+ full_task_graph,
+ label_to_taskid,
+ parameters,
+ decision_task_id,
+ )