ci: Add support for bootc end-to-end validation tests#94
Merged
Conversation
Reviewer's GuideThis PR enhances the GitHub Actions CI pipeline by upgrading tox-lsr to 3.10.0 across all workflows, adding a Ubuntu-specific podman 5.x workaround for bootc image builds, and extending the qemu-kvm integration job to run bootc end-to-end validation tests in a two-step buildah/QEMU workflow. Sequence Diagram: Bootc End-to-End Validation ProcesssequenceDiagram
actor Dev as Developer
participant GHA as GitHub Actions
participant TOX_P as "Tox (Preparation Stage)"
participant BUILD as "Buildah Process (e.g., bootc-buildah-qcow.sh)"
participant TOX_V as "Tox (Validation Stage)"
participant QEMU as "QEMU VM"
Dev->>GHA: Push/PR triggers CI workflow
GHA->>TOX_P: Invoke bootc preparation environment
TOX_P->>BUILD: Execute image build script
BUILD->>BUILD: Build bootc container image using Ansible role
BUILD-->>TOX_P: Return path to disk.qcow2
TOX_P-->>GHA: Preparation complete, disk.qcow2 available
GHA->>TOX_V: Invoke bootc validation environment (with disk.qcow2)
TOX_V->>QEMU: Deploy disk.qcow2 and start VM
QEMU->>QEMU: Boot OS from image
QEMU->>QEMU: Run validation scripts on deployed configuration
QEMU-->>TOX_V: Return validation status
TOX_V-->>GHA: Validation status
GHA-->>Dev: Report overall test status
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @richm - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Review instructions: all looks good
- 🟢 Testing: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
NOTE: This also requires upgrading to tox-lsr 3.10.0, and some hacks to workaround a podman issue in ubuntu. These tests run the role during a bootc container image build, deploy the container into a QEMU VM, boot that, and validate the expected configuration there. They run in two different tox environments, and thus have to be run in two steps (preparation in buildah, validation in QEMU). The preparation is expected to output a qcow2 image in `tests/tmp/TESTNAME/qcow2/disk.qcow2`, i.e. the output structure of <https://github.com/osbuild/bootc-image-builder>. There are two possibilities: * Have separate bootc end-to-end tests. These are tagged with `tests::bootc-e2` and are skipped in the normal qemu-* scenarios. They run as part of the container-* ones. * Modify an existing test: These need to build a qcow2 image exactly *once* (via calling `bootc-buildah-qcow.sh`) and skip setup/cleanup and role invocations in validation mode, i.e. when `__bootc_validation` is true. In the container scenario, run the QEMU validation as a separate step in the workflow. See https://issues.redhat.com/browse/RHEL-88396 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE: This also requires upgrading to tox-lsr 3.10.0, and some
hacks to workaround a podman issue in ubuntu.
These tests run the role during a bootc container image build, deploy
the container into a QEMU VM, boot that, and validate the expected
configuration there. They run in two different tox environments, and
thus have to be run in two steps (preparation in buildah, validation in
QEMU). The preparation is expected to output a qcow2 image in
tests/tmp/TESTNAME/qcow2/disk.qcow2, i.e. the output structure ofhttps://github.com/osbuild/bootc-image-builder.
There are two possibilities:
Have separate bootc end-to-end tests. These are tagged with
tests::bootc-e2and are skipped in the normal qemu-* scenarios.They run as part of the container-* ones.
Modify an existing test: These need to build a qcow2 image exactly
once (via calling
bootc-buildah-qcow.sh) and skip setup/cleanupand role invocations in validation mode, i.e. when
__bootc_validationis true.In the container scenario, run the QEMU validation as a separate step in
the workflow.
See https://issues.redhat.com/browse/RHEL-88396