ci: Add Packit CI with RPM builds and TMT integration tests#3576
ci: Add Packit CI with RPM builds and TMT integration tests#3576cgwalters merged 4 commits intoostreedev:mainfrom
Conversation
|
Hi @henrywang. Thanks for your PR. I'm waiting for a ostreedev member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
Code Review
This pull request introduces a Packit-based CI pipeline, which is a significant enhancement. The changes are extensive, adding new configurations for Packit and TMT, modifying the Dockerfile, and including new test scripts. My review has identified a critical bug in a provisioning script that needs to be addressed, as well as several instances of code duplication and opportunities to improve the robustness and maintainability of the new CI infrastructure. Addressing these points will help ensure the new pipeline is reliable and easy to manage.
| # Stock extra cleaning of logs and caches in general (mostly dnf) | ||
| rm /var/log/* /var/cache /var/lib/{dnf,rpm-state,rhsm} -rf | ||
| # And clean root's homedir | ||
| rm /var/roothome/.config -rf |
There was a problem hiding this comment.
| playbook: | ||
| - https://github.com/bootc-dev/bootc/raw/refs/heads/main/hack/packit-reboot.yml |
There was a problem hiding this comment.
271e988 to
fbd56f9
Compare
|
Failed to load packit config file: For more info, please check out the documentation or contact the Packit team. You can also use our CLI command |
7d096f7 to
2b2a175
Compare
| if tmt run --id "${vm_name}" --all \ | ||
| provision --how connect \ |
There was a problem hiding this comment.
That said it is probably time to open up the conversation with tmt upstream about supporting bcvk directly...it would remove a lot of gnarly code.
|
Add Packit-based CI pipeline that builds RPMs via COPR and runs TMT integration tests on bootc image-mode systems. This follows the bootc-dev/bootc pattern of per-plan VM isolation using bcvk. Key changes: - Dockerfile: Add rpmbuild stage, use RPM overlay for rootfs, run provision-derived.sh for VM provisioning (cloud-init, rsync, etc.) - Justfile: Add package target, test-tmt target with bcvk per-plan VMs, longer SSH wait for cloud-init first boot - .github/workflows/bootc.yaml: Split into unit-tests and integration jobs, archive TMT logs with PR number in artifact name - .packit.yaml: COPR builds + TMT tests for centos-stream-9/10 and fedora-43/44 on x86_64/aarch64 - tmt/: FMF test plans and shell-based tests (booted verification, privileged ostree tests) translated from Rust integration tests - hack/: Packit provisioning scripts to convert package-mode VMs to image-mode via bootc install to-filesystem Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
2b2a175 to
b0cd80d
Compare
VM deployment is now handled externally by `just test-tmt` (bcvk + tmt) or `just integration-container` (bcvk direct SSH). The Rust test binary runs inside the VM as root, so the require_root/RunMode dispatch logic is no longer needed. - Remove require_root(), RunMode enum, and bcvk dispatch code - Simplify booted_test! and privileged_test! macros to just register and run tests directly - Remove rustix dependency (no longer checking getuid) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
Replace the inline bash script in the Justfile test-tmt target with a Rust xtask crate (tests/xtask/) that handles TMT plan discovery, bcvk VM lifecycle, SSH readiness polling, and tmt invocation. This follows the bootc-dev/bootc cargo xtask run-tmt pattern. Also fix tests.fmf to pass test names individually with --exact, since libtest_mimic only accepts a single filter argument. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
Set CARGO_HOME=/var/tmp/.cargo to avoid conflict with /root/.cargo which exists as a non-directory on Fedora 43/44 base images, causing "failed to create directory: File exists (os error 17)". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
|
Looks like it needs |
Add Packit-based CI pipeline that builds RPMs via COPR and runs TMT integration tests on bootc image-mode systems. This follows the bootc-dev/bootc pattern of per-plan VM isolation using bcvk.
Key changes: