From ccbccb169172d3207235d2637f9b3c13edd56686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Mon, 18 Nov 2024 13:58:01 +0100 Subject: [PATCH] Move edpm_update molecule to Zuul For a future change, we need a more "baremetal-like" environment to be able to test a new feature (kpatch). --- .github/workflows/molecule.yaml | 1 - .../molecule/default/Containerfile.j2 | 14 ------- .../edpm_update/molecule/default/molecule.yml | 37 +++++++------------ .../edpm_update/molecule/default/prepare.yml | 7 ++++ zuul.d/jobs.yaml | 5 +++ zuul.d/projects.yaml | 2 + 6 files changed, 27 insertions(+), 39 deletions(-) delete mode 100644 roles/edpm_update/molecule/default/Containerfile.j2 diff --git a/.github/workflows/molecule.yaml b/.github/workflows/molecule.yaml index 80db37c4d..518d6218c 100644 --- a/.github/workflows/molecule.yaml +++ b/.github/workflows/molecule.yaml @@ -44,7 +44,6 @@ jobs: - edpm_timezone - edpm_telemetry - edpm_telemetry_logging - - edpm_update - edpm_users - env_data - edpm_pre_adoption_validation diff --git a/roles/edpm_update/molecule/default/Containerfile.j2 b/roles/edpm_update/molecule/default/Containerfile.j2 deleted file mode 100644 index 7ef82c4ec..000000000 --- a/roles/edpm_update/molecule/default/Containerfile.j2 +++ /dev/null @@ -1,14 +0,0 @@ - -{% if item.registry is defined %} -FROM {{ item.registry.url }}/{{ item.image }} -{% else %} -FROM {{ item.image }} -{% endif %} - -RUN curl -o /etc/yum.repos.d/delorean.repo https://trunk.rdoproject.org/centos9-wallaby/current/delorean.repo && \ - curl -o /etc/yum.repos.d/delorean-deps.repo https://trunk.rdoproject.org/centos9-wallaby/delorean-deps.repo && \ - dnf -y install sudo python3-libselinux selinux-policy {{ item.pkg_extras | default('') }} && \ - dnf install -y python*tripleo-repos && \ - dnf clean all -y - -CMD [ '/sbin/init' ] diff --git a/roles/edpm_update/molecule/default/molecule.yml b/roles/edpm_update/molecule/default/molecule.yml index 19de713a3..e4a784e58 100644 --- a/roles/edpm_update/molecule/default/molecule.yml +++ b/roles/edpm_update/molecule/default/molecule.yml @@ -4,35 +4,24 @@ dependency: options: role-file: collections.yml driver: - name: podman + name: delegated + options: + managed: false + ansible_connection_options: + ansible_connection: local platforms: -- command: /sbin/init - dockerfile: Containerfile.j2 - image: ${EDPM_ANSIBLE_MOLECULE_IMAGE:-"ubi9/ubi-init"} - name: instance - privileged: true - registry: - url: ${EDPM_ANSIBLE_MOLECULE_REGISTRY:-"registry.access.redhat.com"} - ulimits: - - host + - name: edpm-0.localdomain + groups: + - compute provisioner: log: true name: ansible - inventory: - hosts: - all: - hosts: - instance: - canonical_hostname: edpm-0.localdomain + scenario: test_sequence: - - dependency - - destroy - - create - - prepare - - converge - - verify - - cleanup - - destroy + - prepare + - converge + - cleanup + - destroy verifier: name: ansible diff --git a/roles/edpm_update/molecule/default/prepare.yml b/roles/edpm_update/molecule/default/prepare.yml index c134b244e..6b022eaf9 100644 --- a/roles/edpm_update/molecule/default/prepare.yml +++ b/roles/edpm_update/molecule/default/prepare.yml @@ -14,6 +14,13 @@ # License for the specific language governing permissions and limitations # under the License. +- name: Prepare test_deps + hosts: all + gather_facts: false + roles: + - role: ../../../../molecule/common/test_deps + test_deps_setup_edpm: true + test_deps_setup_stream: true - name: Prepare hosts: all diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 4d59418b9..84c276a5a 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -76,6 +76,11 @@ parent: edpm-ansible-molecule-base vars: TEST_RUN: edpm_telemetry_power_monitoring +- job: + name: edpm-ansible-molecule-edpm_update + parent: edpm-ansible-molecule-base + vars: + TEST_RUN: edpm_update - job: name: edpm-ansible-tempest-multinode parent: openstack-operator-tempest-multinode diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml index b90458bf1..160238286 100644 --- a/zuul.d/projects.yaml +++ b/zuul.d/projects.yaml @@ -19,6 +19,7 @@ - edpm-ansible-molecule-edpm_tripleo_cleanup - edpm-ansible-molecule-edpm_tuned - edpm-ansible-molecule-edpm_telemetry_power_monitoring + - edpm-ansible-molecule-edpm_update - openstack-k8s-operators-content-provider - adoption-standalone-to-crc-ceph-provider: dependencies: @@ -56,3 +57,4 @@ - ^roles/edpm_telemetry/* - ^roles/edpm_pre_adoption_validation/* - ^roles/edpm_tripleo_cleanup/* + - ^roles/edpm_update/*