Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 24 additions & 7 deletions roles/common_tools/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---
- name: Enable CentOS-Stream-CRB
action: shell dnf config-manager --set-enabled crb
when: releasever == 9 or releasever == 10

- name: Install basic tools
package:
name: "{{ item }}"
Expand All @@ -10,6 +14,7 @@
- postfix
- acl
- fpaste
- gcc-c++

- name: Install Fedora packages
package:
Expand All @@ -18,13 +23,13 @@
with_items:
- golang-github-cpuguy83-md2man
- openssl
- python3.12
- python3-pytest
- python3-pip
- s-nail
- podman
- podman-docker
- pciutils
- python3
- python3-pytest
- python3-pip
when: releasever > 30

- name: Install CentOS Stream 9 packages
Expand All @@ -39,8 +44,8 @@
- podman
- podman-docker
- python3.12
- python3-pytest
- python3-pip
- python3.12-pytest
- python3.12-pip
when: releasever == 9

- name: Install CentOS Stream 10 packages
Expand All @@ -55,8 +60,8 @@
- podman
- podman-docker
- python3.12
- python3-pytest
- python3-pip
- python3.12-pytest
- python3.12-pip
when: releasever == 10

- name: Create dir /etc/containers
Expand All @@ -73,3 +78,15 @@
state: touch
mode: 0644
when: releasever > 7

- name: Install container-ci-suite for tests
pip:
name: git+https://github.com/sclorg/container-ci-suite
executable: pip3.12
when: releasever == 9 or releasever == 10

- name: Install container-ci-suite for tests
pip:
name: git+https://github.com/sclorg/container-ci-suite
executable: pip3
when: releasever > 30
19 changes: 19 additions & 0 deletions tasks/check_pip_package_present.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- block:
- name: Check if pip package is present {{ item }} exists
command: pip3.12 list | grep "{{ item }}"
register: pip_result
- debug: var=pip_result
- name: Fail if pip is not present
fail: msg="This host {{ os_test }} does not contain pip package {{ item }}"
when: pip_result.rc != 0
when: (os_test is defined) and (os_test == "centos-stream-9-plan")

- block:
- name: Check if pip package is present {{ item }} exists
command: pip3 list | grep "{{ item }}"
register: pip_result
- debug: var=pip_result
- name: Fail if pip is not present
fail: msg="This host {{ os_test }} does not contain pip package {{ item }}"
when: pip_result.rc != 0
when: (os_test is defined) and (os_test != "centos-stream-9-plan")
26 changes: 17 additions & 9 deletions tmt-sclorg-testing-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
- s-nail
- ansible
- python3.12
- python3-pytest
- python3-pip
- python3.12-pytest
- python3.12-pip
package_names_c10s:
- golang-github-cpuguy83-md2man
- s-nail
- ansible-core
- python3.12
- python3
- python3-pytest
- python3-pip
package_names_fedora:
Expand All @@ -34,7 +34,7 @@
- golang-github-cpuguy83-md2man
- s-nail
- ansible
- python3.12
- python3
- python3-pytest
- python3-pip
package_names_image_mode_c9s:
Expand All @@ -51,6 +51,8 @@
- /etc/containers/nodocker
output_check_gpu_fedora_nvidia:
- { command: 'lspci -mm', device_name: '{{ gpu }}', vendor_name: 'NVIDIA' }
pip_check_install:
- container-ci-suite

tasks:
- debug: msg="{{ os_test }}"
Expand All @@ -61,7 +63,10 @@
- name: Check if files are present on CentOS Stream 9
include_tasks: ./tasks/check_file_presents.yml
loop: "{{ files_to_check_c9s }}"
when: (os_test is defined) and (os_test == "c9s")
- name: Check if pip package is present on C9S
include_tasks: ./tasks/check_pip_package_present.yml
loop: "{{ pip_check_install }}"
when: (os_test is defined) and (os_test == "centos-stream-9-plan")

- block:
- name: Check if listed package is installed on Image mode CentOS Stream 9
Expand All @@ -79,27 +84,30 @@
- name: Check if files are present on CentOS Stream 10
include_tasks: ./tasks/check_file_presents.yml
loop: "{{ files_to_check_c10s }}"
when: (os_test is defined) and (os_test == "c10s")
- name: Check if pip package is present on C10S
include_tasks: ./tasks/check_pip_package_present.yml
loop: "{{ pip_check_install }}"
when: (os_test is defined) and (os_test == "centos-stream-10-plan")

- block:
- name: Check if listed package is installed on Fedora
include_tasks: ./tasks/check_rpm_presents.yml
loop: "{{ package_names_all + package_names_fedora }}"

- name: Check if file {{ item }} exists
include_tasks: ./tasks/check_file_presents.yml
loop: "{{ files_to_check_fedora }}"
- name: Check if pip package is present on Fedora
include_tasks: ./tasks/check_pip_package_present.yml
loop: "{{ pip_check_install }}"
when: (os_test is defined) and (os_test == "fedora")

- block:
- name: Check if listed package is installed on Fedora
include_tasks: ./tasks/check_rpm_presents.yml
loop: "{{ package_names_all + package_names_fedora + package_names_gpu_fedora }}"

- name: Check if file {{ item }} exists
include_tasks: ./tasks/check_file_presents.yml
loop: "{{ files_to_check_fedora }}"

- name: Check if output {{ item }} exists
include_tasks: ./tasks/check_output_command.yml
loop: "{{ output_check_gpu_fedora_nvidia }}"
Expand Down