ci: Add container integration test for rpm and bootc#52
ci: Add container integration test for rpm and bootc#52martinpitt merged 2 commits intolinux-system-roles:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #52 +/- ##
=======================================
Coverage ? 52.31%
=======================================
Files ? 1
Lines ? 346
Branches ? 0
=======================================
Hits ? 181
Misses ? 165
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| - { image: "fedora-42", env: "container-ansible-core-2.17" } | ||
|
|
||
| env: | ||
| TOX_ARGS: "--skip-tags tests::infiniband,tests::nvme,tests::scsi" |
There was a problem hiding this comment.
nice! refactoring this will allow us to do per-role tags in the future
fc6bac3 to
7114132
Compare
d13392d to
0885636
Compare
0885636 to
07bff5b
Compare
b4d83ba to
b9aa6ac
Compare
|
The current version (commit b9aa6ac) is all green, but with a tear in my eye I'll re-disable the "classic rpm" container scenarios. They work fine here, but already caused some (easily fixable) trouble in the firewall role, and some serious (SELinux) trouble in cockpit. It would be nice to cover/fix them and fix lsr for containers, but (1) let's wait for customers to actually ask for that, and (2) we have too much work ongoing already ("pick your battles"). |
|
Or actually, let's add a new tag for "certified to work in a container"! Then we can selectively enable it for rules where it works. |
b9aa6ac to
bce2f77
Compare
|
I am happy with this now. I also sent it to linux-system-roles/firewall#264 and linux-system-roles/cockpit#212 to test them against a more complex scenarios. In particular, firewall only supports the "container" tag, while cockpit only supports the "containerbuild" tag (not not quite yet, but working on it 🔨 ) So this is ready for a round of reviews. Once we are all happy with this, I'll sync the other two PRs and send it to .github.git - we can mass-deploy this now and then selectively work on enabling the container and containerbuild scenarios. |
bce2f77 to
888087f
Compare
Generalize qemu-kvm-integration-tests.yml to run some "container-*" environments as well. For "classic rpm" OSes that does not give us too much beyond making sure that the container tests actually work (developers might use them locally, after all). 90% of the logic (setup, compatibility check, status updates, etc.) is the same, so it's not economic to duplicate all of that into a new workflow. Add Fedora/CentOS *-bootc scenarios: These check that our role works during a bootc container build, without any systemd, processes, or other runtime environment. tox-lsr added support for this in linux-system-roles/tox-lsr#188. However, as most roles don't currently work in that environment, introduce and check a new `containerbuild` tag in meta/main.yml. We'll add this to roles as we adjust them. Similarly, as not every role works in a running container (e.g. due to assuming SELinux), check a new `container` tag in their tests. See https://issues.redhat.com/browse/RHEL-85652
Feature: Support running the sudo role during container builds and in container environments. Reason: This is particularly useful for building bootc derivative OSes. It's also desirable to run roles in system containers. Result: These flags enable running the container scenarios in CI, which ensures that the role works in podman system containers as well as buildah build environment and thus allows us to officially support this role for image mode builds. See https://issues.redhat.com/browse/RHEL-78157
888087f to
86dee84
Compare
Generalize qemu-kvm-integration-tests.yml to run some "container-*" environments as well. For "classic rpm" OSes that does not give us too much beyond making sure that the container tests actually work (developers might use them locally, after all). 90% of the logic (setup, compatibility check, status updates, etc.) is the same, so it's not economic to duplicate all of that into a new workflow.
Add Fedora/CentOS *-bootc scenarios: These check that our role works during a bootc container build, without any systemd, processes, or other runtime environment. tox-lsr added support for this in linux-system-roles/tox-lsr#188.
However, as most roles don't currently work in that environment, introduce and check a new
containerbuildtag in meta/main.yml. We'll add this to roles as we adjust them.Similarly, as not every role works in a running container (e.g. due to assuming SELinux), check a new
containertag in their tests.Issue Tracker Tickets (Jira or BZ if any): https://issues.redhat.com/browse/RHEL-85652
tags::booted)containerbuildtag, so that we can start introducing these tests to all roles and allow us to fix them individually.