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 #1920

Draft
wants to merge 4 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
18 changes: 5 additions & 13 deletions packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,16 @@ 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"]
tf_extra_params:
environments:
- artifacts: []

Copy link

@thrix thrix Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tf_extra_params:
environments:
- artifacts: []

Copy link

@thrix thrix Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@martinpitt let's try this, this should disable the artifacts installation :)

You can consume then the copr build via Packit's environment variables it injects to the tests:

https://packit.dev/docs/configuration/upstream/tests#optional-parameters

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thrix Thanks for the hint! I'm a bit sceptical, as in cockpit that felt additive, not replacing. But pushed, let's try!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to report that, we have other ways to try it out, let me open a new MR so i can experiment and help

Copy link

@thrix thrix Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuing myself in #1924 for a prototype with all the needed workarounds

- job: copr_build
trigger: release
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