Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: This PR is to trigger periodic CI testing #1

Draft
wants to merge 36 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9f3c2c6
ci: This PR is to trigger periodic CI testing
github-actions[bot] May 4, 2024
48038a7
ci: This PR is to trigger periodic CI testing
github-actions[bot] May 11, 2024
e375e20
ci: This PR is to trigger periodic CI testing
github-actions[bot] May 18, 2024
41014bd
ci: This PR is to trigger periodic CI testing
github-actions[bot] May 25, 2024
19121d6
ci: This PR is to trigger periodic CI testing
github-actions[bot] Jun 1, 2024
a7cbcaa
ci: This PR is to trigger periodic CI testing
github-actions[bot] Jun 8, 2024
ef9154a
ci: This PR is to trigger periodic CI testing
github-actions[bot] Jun 15, 2024
952c624
ci: This PR is to trigger periodic CI testing
github-actions[bot] Jun 22, 2024
ff3fa60
ci: This PR is to trigger periodic CI testing
github-actions[bot] Jun 29, 2024
5fc3054
ci: This PR is to trigger periodic CI testing
github-actions[bot] Jul 6, 2024
183e90e
ci: This PR is to trigger periodic CI testing
github-actions[bot] Jul 13, 2024
2c0b98d
ci: This PR is to trigger periodic CI testing
github-actions[bot] Jul 20, 2024
e7e51f9
ci: This PR is to trigger periodic CI testing
github-actions[bot] Jul 28, 2024
b762068
ci: This PR is to trigger periodic CI testing
github-actions[bot] Aug 3, 2024
5c45297
ci: This PR is to trigger periodic CI testing
github-actions[bot] Aug 10, 2024
3bd5133
ci: This PR is to trigger periodic CI testing
github-actions[bot] Aug 17, 2024
5e7ad74
ci: This PR is to trigger periodic CI testing
github-actions[bot] Aug 24, 2024
9a42fe0
ci: This PR is to trigger periodic CI testing
github-actions[bot] Aug 31, 2024
c437f16
ci: This PR is to trigger periodic CI testing
github-actions[bot] Sep 7, 2024
c0385b7
ci: This PR is to trigger periodic CI testing
github-actions[bot] Sep 14, 2024
2dd02c1
ci: This PR is to trigger periodic CI testing
github-actions[bot] Sep 21, 2024
ea1fc11
ci: This PR is to trigger periodic CI testing
github-actions[bot] Sep 28, 2024
8b8dd14
ci: This PR is to trigger periodic CI testing
github-actions[bot] Oct 5, 2024
18425ef
ci: This PR is to trigger periodic CI testing
github-actions[bot] Oct 12, 2024
7511cf6
ci: This PR is to trigger periodic CI testing
github-actions[bot] Oct 19, 2024
1677f86
ci: This PR is to trigger periodic CI testing
github-actions[bot] Oct 26, 2024
7fc3b8c
ci: This PR is to trigger periodic CI testing
github-actions[bot] Nov 2, 2024
1a34c6d
ci: This PR is to trigger periodic CI testing
github-actions[bot] Nov 10, 2024
59c81f3
ci: This PR is to trigger periodic CI testing
github-actions[bot] Nov 16, 2024
cfa06fa
ci: This PR is to trigger periodic CI testing
github-actions[bot] Nov 23, 2024
4f8f9b5
ci: This PR is to trigger periodic CI testing
github-actions[bot] Nov 30, 2024
0bdc193
ci: This PR is to trigger periodic CI testing
github-actions[bot] Dec 7, 2024
41f670b
ci: This PR is to trigger periodic CI testing
github-actions[bot] Dec 14, 2024
5e615eb
ci: This PR is to trigger periodic CI testing
github-actions[bot] Dec 21, 2024
4cd20f3
ci: This PR is to trigger periodic CI testing
github-actions[bot] Dec 28, 2024
c151914
ci: This PR is to trigger periodic CI testing
github-actions[bot] Jan 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions tests/callback_plugins/dump_packages.py
Original file line number Diff line number Diff line change
@@ -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