From f5e8812f7e7a393eadb50f11f6b6e1253cf5448b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 26 Oct 2024 11:18:08 +0000 Subject: [PATCH 01/12] ci: This PR is to trigger periodic CI testing --- tests/callback_plugins/dump_packages.py | 64 +++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 tests/callback_plugins/dump_packages.py diff --git a/tests/callback_plugins/dump_packages.py b/tests/callback_plugins/dump_packages.py new file mode 100644 index 0000000..433fe54 --- /dev/null +++ b/tests/callback_plugins/dump_packages.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2023, Red Hat, Inc. +# SPDX-License-Identifier: MIT + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = """ + author: Rich Megginson + name: dump_packages + type: aggregate + short_description: dump arguments to package module + description: + - Dump arguments to package module to get list of packages. + - Used in conjunction with CI testing to get the packages used + - with all combinations of: distribution/version/role arguments + - Used to generate lists of packages for ostree image builds. + requirements: + - None +""" + +from ansible.plugins.callback import CallbackBase # noqa: E402 + + +class CallbackModule(CallbackBase): + """ + Dump packages. + """ + + CALLBACK_VERSION = 2.0 + CALLBACK_TYPE = "aggregate" + CALLBACK_NAME = "dump_packages" + # needed for 2.9 compatibility + CALLBACK_NEEDS_WHITELIST = False # wokeignore:rule=whitelist + CALLBACK_NEEDS_ENABLED = False + + def __init__(self, *args, **kwargs): + super(CallbackModule, self).__init__(*args, **kwargs) + + def v2_runner_on_ok(self, result): + fields = result._task_fields + if ( + fields["action"] in ["package", "dnf", "yum"] + and fields["args"].get("state") != "absent" + ): + packages = set() + if "invocation" in result._result: + results = [result._result] + elif "results" in result._result and isinstance( + result._result["results"], list + ): + results = result._result["results"] + for item in results: + pkgs = item["invocation"]["module_args"]["name"] + if isinstance(pkgs, list): + for ii in pkgs: + packages.add(ii) + else: + packages.add(pkgs) + # tell python black that this line is ok + # fmt: off + self._display.display("lsrpackages: " + " ".join(sorted(list(packages)))) + # fmt: on From a3db56487c131cc1c1113d6c5ef7f43aa7998e2b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 2 Nov 2024 11:16:24 +0000 Subject: [PATCH 02/12] ci: This PR is to trigger periodic CI testing From 416b30f496dc3ffed3701da7fbd9ed2d4d887476 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 9 Nov 2024 11:16:44 +0000 Subject: [PATCH 03/12] ci: This PR is to trigger periodic CI testing From 0782ae64a498cd02903322018fc3e0f448e23fe1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 16 Nov 2024 11:16:53 +0000 Subject: [PATCH 04/12] ci: This PR is to trigger periodic CI testing From a402564f5f13b9b803f1f98d0f6c594bceb33931 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 23 Nov 2024 11:17:27 +0000 Subject: [PATCH 05/12] ci: This PR is to trigger periodic CI testing From fc8853017a1489e3cee88abd9d90882f841be8ad Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 Nov 2024 11:17:37 +0000 Subject: [PATCH 06/12] ci: This PR is to trigger periodic CI testing From 1a38cd6cc82dbc6b360018e9c8084b9966624390 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 7 Dec 2024 11:17:26 +0000 Subject: [PATCH 07/12] ci: This PR is to trigger periodic CI testing From de52a02a1c2ae08e29caa79f76bee6572174a063 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 14 Dec 2024 11:17:18 +0000 Subject: [PATCH 08/12] ci: This PR is to trigger periodic CI testing From 0a9bb78179abdaec933541ab68580420fb44841a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 21 Dec 2024 11:15:35 +0000 Subject: [PATCH 09/12] ci: This PR is to trigger periodic CI testing From c752e4dc470f73f152b9a1951f9575ab7b05f6e8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 28 Dec 2024 11:15:48 +0000 Subject: [PATCH 10/12] ci: This PR is to trigger periodic CI testing From 88463c2e5fa6721af6d263272dd6731bded433fd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 4 Jan 2025 11:16:28 +0000 Subject: [PATCH 11/12] ci: This PR is to trigger periodic CI testing From f4be3d0e9f19d182d41ea1baf6a859eb14a79a15 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 11 Jan 2025 11:16:40 +0000 Subject: [PATCH 12/12] ci: This PR is to trigger periodic CI testing