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

test: Add CentOS 9 image mode #1924

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
15 changes: 2 additions & 13 deletions packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,13 @@ jobs:
- job: copr_build
trigger: pull_request
targets:
- fedora-40
- fedora-41
- fedora-latest-aarch64
- fedora-development
- centos-stream-9-x86_64
- centos-stream-9-aarch64
- centos-stream-10

- job: tests
trigger: pull_request
targets:
- fedora-40
- fedora-41
- fedora-latest-aarch64
- fedora-development
- centos-stream-9-x86_64
- centos-stream-9-aarch64
- centos-stream-10
centos-stream-9-x86_64:
distros: ["centos-stream-9", "CentOS-Stream-9-image-mode"]

- job: copr_build
trigger: release
Expand Down
6 changes: 6 additions & 0 deletions plans/all.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ adjust:
script: |
rm --force --verbose /etc/yum.repos.d/fedora.repo
when: distro == centos-10
# Disable artifact installation in case of bootc
- how: install
exclude:
- .*
# TODO: enable later
# when: bootc is defined

# Let's handle them upstream only, don't break Fedora/RHEL reverse dependency gating
environment:
Expand Down
49 changes: 34 additions & 15 deletions test/browser/browser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,40 @@
set -eux
cd "${0%/*}/../.."

# HACK: ensure that critical components are up to date: https://github.com/psss/tmt/issues/682
dnf update -y podman crun conmon criu

# Missing iptables-nft dependency https://issues.redhat.com/browse/RHEL-58240 and
# https://bugzilla.redhat.com/show_bug.cgi?id=2319310
if grep -Eq 'platform:(el10|f41)' /etc/os-release; then
dnf install -y iptables-nft
fi

# if we run during cross-project testing against our main-builds COPR, then let that win
# even if Fedora has a newer revision
main_builds_repo="$(ls /etc/yum.repos.d/*cockpit*main-builds* 2>/dev/null || true)"
if [ -n "$main_builds_repo" ]; then
echo 'priority=0' >> "$main_builds_repo"
dnf distro-sync -y --repo 'copr*' cockpit-podman
# install dependencies programmatically due to https://issues.redhat.com/browse/TFT-3020
TEST_DEPS="systemd-container cockpit-podman cockpit-ws cockpit-system criu nginx"

if [ "${TMT_REBOOT_COUNT:-0}" -eq 0 ]; then
if bootc status | grep -q version; then
# redeploy ourselves with required test dependencies
# TODO: get correct c-podman version; https://packit.dev/docs/configuration/upstream/tests#optional-parameters
cat > Containerfile <<EOF
FROM $(bootc status --json | jq -r .status.booted.image.image.image)
RUN dnf install -y $TEST_DEPS && dnf install --best -y --enablerepo=updates-testing cockpit-system cockpit-ws && dnf clean all
EOF
podman build -t localhost/test .
bootc switch --transport containers-storage localhost/test
podman rmi --all
tmt-reboot

else
# HACK: ensure that critical components are up to date: https://github.com/psss/tmt/issues/682
dnf install --best -y $TEST_DEPS

# Missing iptables-nft dependency https://issues.redhat.com/browse/RHEL-58354 and
# https://bugzilla.redhat.com/show_bug.cgi?id=2319310
if grep -Eq 'platform:(el10|f41)' /etc/os-release; then
dnf install -y iptables-nft
fi

# if we run during cross-project testing against our main-builds COPR, then let that win
# even if Fedora has a newer revision
main_builds_repo="$(ls /etc/yum.repos.d/*cockpit*main-builds* 2>/dev/null || true)"
if [ -n "$main_builds_repo" ]; then
echo 'priority=0' >> "$main_builds_repo"
dnf distro-sync -y --repo 'copr*' cockpit-podman
fi
fi
fi

# Show critical package versions
Expand Down
11 changes: 4 additions & 7 deletions test/browser/main.fmf
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
require:
- systemd-container
- cockpit-podman
- cockpit-ws
- cockpit-system
- criu
- nginx
# TF/tmt don't handle this with bootc: https://issues.redhat.com/browse/TFT-3020
# done programmatically in test/browser/browser.sh
# require:

duration: 30m

/system:
Expand Down