From fbbe67fdbf883a26694c819d6c1450389b03611f Mon Sep 17 00:00:00 2001 From: Sagi Shnaidman Date: Tue, 8 Aug 2023 08:08:51 +0300 Subject: [PATCH] Add unstable podman to jobs --- .github/workflows/podman_container_api.yml | 12 ++++++++++-- plugins/module_utils/podman/common.py | 2 ++ plugins/module_utils/podman/podman_container_lib.py | 5 ----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/podman_container_api.yml b/.github/workflows/podman_container_api.yml index 84708d3e..97283861 100644 --- a/.github/workflows/podman_container_api.yml +++ b/.github/workflows/podman_container_api.yml @@ -31,7 +31,7 @@ on: jobs: test_podman_container_api: - name: Podman API container ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }} + name: Podman API container ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}-${{ matrix.podman-version || 'unstable' }} runs-on: ${{ matrix.os || 'ubuntu-22.04' }} defaults: run: @@ -47,6 +47,13 @@ jobs: - ubuntu-22.04 python-version: - "3.10" + podman-version: + - unstable + include: + - os: ubuntu-22.04 + ansible-version: git+https://github.com/ansible/ansible.git@stable-2.15 + python-version: "3.10" + podman-version: stable steps: @@ -112,7 +119,8 @@ jobs: -e host=localhost \ -i localhost, \ -e ansible_connection=local \ - -e setup_python=false + -e setup_python=false \ + -e podman_version_ubuntu=${{ matrix.podman-version }} TEST2RUN=podman_container_api ./ci/run_containers_tests.sh shell: bash diff --git a/plugins/module_utils/podman/common.py b/plugins/module_utils/podman/common.py index 54f3b6e5..bb756b87 100644 --- a/plugins/module_utils/podman/common.py +++ b/plugins/module_utils/podman/common.py @@ -429,6 +429,8 @@ def diff_generic(params, info_config, module_arg, cmd_arg, boolean_type=False): else: before = ",".join(sorted(before)) if len(before) > 1 else before[0] return before, after + + class PodmanAPI: def __init__(self, module, module_params): if module_params.get('podman_socket') and not HAS_REQUESTS: diff --git a/plugins/module_utils/podman/podman_container_lib.py b/plugins/module_utils/podman/podman_container_lib.py index dafe1d74..5ed1100a 100644 --- a/plugins/module_utils/podman/podman_container_lib.py +++ b/plugins/module_utils/podman/podman_container_lib.py @@ -9,16 +9,11 @@ from ansible_collections.containers.podman.plugins.module_utils.podman.common import lower_keys from ansible_collections.containers.podman.plugins.module_utils.podman.common import generate_systemd from ansible_collections.containers.podman.plugins.module_utils.podman.common import delete_systemd -<<<<<<< HEAD from ansible_collections.containers.podman.plugins.module_utils.podman.common import diff_generic from ansible_collections.containers.podman.plugins.module_utils.podman.common import createcommand from ansible_collections.containers.podman.plugins.module_utils.podman.quadlet import create_quadlet_state from ansible_collections.containers.podman.plugins.module_utils.podman.quadlet import ContainerQuadlet - -======= -from ansible_collections.containers.podman.plugins.module_utils.podman.common import normalize_signal from .common import PodmanAPI ->>>>>>> e7671a8 (Add option to run with podman-py API) __metaclass__ = type