Add boot tests (HMS-10336)#85
Draft
thozza wants to merge 16 commits intoosbuild:mainfrom
Draft
Conversation
The Schutzfile pins the images library commit that the boot test infrastructure uses. The update script fetches the latest commit from GitHub and updates the ref, mirroring the pattern from the images library's update-schutzfile-osbuild. Assisted-by: Claude Code Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Clone the images library at the Schutzfile-pinned ref, then delegate to its setup-osbuild-repo (which auto-detects the host distro and reads the per-distro osbuild commit from the images library's own Schutzfile) and install-dependencies scripts. The images repo URL is overridable via IMAGES_REPO_URL for cross-testing with draft PRs in the images library. Assisted-by: Claude Code Signed-off-by: Tomáš Hozza <thozza@redhat.com>
e54db94 to
075bad4
Compare
Build a container from a Containerfile into local podman storage at localhost/bootc-foundry/<name>:latest. This script is isolated from build.sh so the container source can be swapped to a registry pull without changing the build logic. Assisted-by: Claude Code Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Build a disk image using the images library's cmd/build tool. Create the build config JSON (with optional installer payload ref), invoke cmd/build with the bootc container ref, and write info.json into the output directory for boot-image to consume. Assisted-by: Claude Code Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Discover the build output directory and config, then delegate to the images library's boot-image script. boot-image reads info.json to determine the boot method (QEMU, ISO, cloud) and runs check-host-config for post-boot validation. Assisted-by: Claude Code Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Add scripts that update GitHub PR with the GitLab CI pipeline status and unregister a RHEL host. Also add the file with terraform ref and also team SSH keys, which get configured as trusted on the CI runner. These files were taken from the osbuild/images and osbuild/osbuild-composer repositories and amended for the use in this repo. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Parse COPY directives from Containerfiles to extract directory
paths for CI change detection rules. Handle arch-specific
substitution of ${TARGETARCH}, skip heredoc and file copies,
and deduplicate directory references.
Assisted-by: Claude Code
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Build change rules from parsed COPY directives, compose CI job dictionaries with runner tags and script sections, and assemble the full GitLab CI config. Installer entries with a payload containerfile get extra container build steps and expanded change detection rules. Assisted-by: Claude Code Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Wire up main() to read config, parse all referenced Containerfiles, generate CI jobs, and emit YAML to stdout. Assisted-by: Claude Code Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Define the central test matrix for boot tests. Each distro maps to a list of Containerfiles with their target image type and supported architectures. The generator reads this to produce the GitLab CI configuration. The osbuild/images CI runs only on Fedora. As a consequence, it uses packages for boot-testing, which are not available on RHEL or CentOS Stream. To not complicate the setup in this repository, let's use Fedora runner as well for all distros. For the purpose of boot-testing the disk images built from derived containers, there is no downside in doing it all on Fedora. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Building RHEL derived bootc container images needs accessing RHEL repositories to install additional packages. Add a subscription-needed flag to the test config, propagate it as a CI variable, and register the system with subscription-manager when the flag is set. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Generated from test/config.yml by test/generate_ci.py. This file is committed so it is reviewable in PRs. Regenerate with 'python3 test/generate_ci.py > .gitlab-ci.yml' after changing the config or generator. Update .yamllint.yaml to use consistent 2-space indentation for sequences, matching PyYAML's default output format. This ensures the generated .gitlab-ci.yml passes yamllint validation. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Regenerate .gitlab-ci.yml on every PR that touches the config, generator, or the CI file itself, and fail if the result differs from what is committed. This catches forgotten regeneration after config or generator changes. Assisted-by: Claude Code Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Automatically fetch the latest images library main branch commit, update the Schutzfile ref, and open a PR. The resulting PR triggers the normal GitLab CI pipeline so the updated images library version is boot-tested before merging. Assisted-by: Claude Code Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Add 'make test' to run the generator unit tests and 'make generate-ci' to regenerate .gitlab-ci.yml from the test config. Assisted-by: Claude Code Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
lzap
reviewed
May 7, 2026
| [ | ||
| "COPY qcow2-${TARGETARCH}/usr/ /usr/", | ||
| "COPY stream10-qcow2 /root/Containerfile", | ||
| ], |
Collaborator
There was a problem hiding this comment.
I would not do any string fixtures when the final goal is to actually boot the image and check it there. Since podman is part of the base image, this can be as efficient and simple as: podman build --dry-run /root/Containerfile
Btw currently it does not build correctly, I am finishing a PR where it will be fixed for all containers.
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.
WIP