Skip to content

Commit

Permalink
Merge pull request #65 from sclorg/add_support_for_c10s
Browse files Browse the repository at this point in the history
Add C10S for testing proposes.
  • Loading branch information
phracek authored May 30, 2024
2 parents eb18a45 + 3f4fe68 commit 3440581
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/rpm-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["fedora", "c8s", "c9s"]
os: ["fedora", "c8s", "c9s", "c10s"]
include:
- os: "fedora"
context: "Fedora"
Expand All @@ -24,6 +24,9 @@ jobs:
- os: "c9s"
context: "CentOS Stream 9"
compose: "CentOS-Stream-9"
- os: "c10s"
context: "CentOS Stream 10"
compose: "CentOS-Stream-10"

if: |
github.event.issue.pull_request
Expand Down
1 change: 1 addition & 0 deletions group_vars/c10s
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
releasever: 10
63 changes: 63 additions & 0 deletions plans/c10s.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
summary: TMT/TFT plan for running container tests on CentOS Stream 10
description: |
Run container tests on CentOS Stream 10

prepare:
- name: Clone repository and switch to corresponding PR
how: shell
script: |
dnf install -y git ansible
git clone $REPO_URL /root/$REPO_NAME
cd /root/$REPO_NAME
git fetch origin +refs/pull/*:refs/remotes/origin/pr/*
git checkout origin/pr/$PR_NUMBER/head
git submodule update --init

execute:
how: tmt

/test-ci:
enabled: true
adjust:
- because: "Plan to be ran when either executed locally, or executed by CI system"
when: >-
trigger is defined
and trigger == code
enabled: false
prepare+:
- name: Enable repositories and prepare machine for tests
how: ansible
playbook:
- tmt-testing-plan-c10s.yml
extra-vars: -vvv
discover:
how: shell
tests:
- name: '$OS, container: $REPO_NAME, version: $SINGLE_VERSION'
framework: shell
test: cd /root/$REPO_NAME && make $TEST_NAME TARGET=$OS SINGLE_VERSION=$SINGLE_VERSION
duration: 3h


/test-plan:
enabled: false
adjust:
- because: "Plan to be ran for checking if packages and files are present as we want"
when: >-
trigger is defined
and trigger == code
enabled: true
prepare+:
- name: Enable repositories and prepare machine for tests
how: shell
script: |
cd /root/$REPO_NAME
git status
ansible-playbook --connection=local --inventory=127.0.0.1, --limit=127.0.0.1 tmt-testing-plan-c10s.yml -vvv
discover:
how: shell
tests:
- name: Run sclorg-testing-farm tests
framework: shell
test: cd /root/$REPO_NAME && git status && OS="$OS" ansible-playbook tmt-sclorg-testing-plan.yml
duration: 1h
20 changes: 20 additions & 0 deletions plans/nightly-container-centos-stream-10.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
summary: TMT/TFT plan for running container nightly tests
description: |
Run nightly container tests on CentOS Stream 10

discover:
how: shell
tests:
- name: Run nightly tests
framework: shell
test: cd /root/ci-scripts && ./daily_tests/daily_scl_tests.sh $OS $TEST
duration: 7h

prepare:
- name: Enable repositories and prepare machine for tests
how: ansible
playbook:
- tmt-testing-plan-c10s.yml

execute:
how: tmt
14 changes: 14 additions & 0 deletions roles/common_tools/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@
- podman-docker
when: releasever == 9

- name: Install CentOS Stream 10 packages
package:
name: "{{ item }}"
state: latest
validate_certs: no
disable_gpg_check: true
with_items:
- https://kojihub.stream.centos.org/kojifiles/vol/koji02/packages/golang-github-cpuguy83-md2man/2.0.3/3.el10/x86_64/golang-github-cpuguy83-md2man-2.0.3-3.el10.x86_64.rpm
- s-nail
- podman
- podman-docker
when: releasever == 10


- name: Create dir /etc/containers
file:
path: /etc/containers
Expand Down
17 changes: 16 additions & 1 deletion tmt-sclorg-testing-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
- podman
- golang-github-cpuguy83-md2man
- s-nail
package_names_c10s:
- podman-docker
- podman
- golang-github-cpuguy83-md2man
- s-nail
package_names_fedora:
- podman-docker
- podman
Expand All @@ -52,7 +57,8 @@
- /etc/containers/nodocker
files_to_check_c9s:
- /etc/containers/nodocker

files_to_check_c10s:
- /etc/containers/nodocker

tasks:
- debug: msg="{{ os_test }}"
Expand Down Expand Up @@ -83,6 +89,15 @@
loop: "{{ files_to_check_c9s }}"
when: (os_test is defined) and (os_test == "c9s")

- block:
- name: Check if listed package is installed on CentOS Stream 10
include_tasks: ./tasks/check_rpm_presents.yml
loop: "{{ package_names_all + package_names_c10s }}"
- 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")

- block:
- name: Check if listed package is installed on Fedora
include_tasks: ./tasks/check_rpm_presents.yml
Expand Down

0 comments on commit 3440581

Please sign in to comment.