-
Notifications
You must be signed in to change notification settings - Fork 162
Description
I'm trying to look at tmt+bootc in: bootc-dev/bootc#543
There's a lot of things going on in this, but basically this is a generic issue about improving the tmt integration story with https://docs.fedoraproject.org/en-US/bootc/
First, what I find just very missing from the tmt docs is recommendations for the what to me seems like a key aspect of injecting code built from the current git repository into the test environment. I understand there's not one approach to this...some people will want to build rpms, others won't (and actually in the case of bootc, we really want to start in many cases from a container image which may become a disk image).
But, let's use a common forge-integrated flow like Github Actions or Gitlab CI as a reference point. From the common case of:
- check out the git repo
- build the code
- run the tests using that code
All the tmt docs I can find just assume you somehow have done these steps as far as I can tell; I was looking for more real-world examples that cover some of these.
Other notes:
I got bit by:
provision:
how: virtual
image: /home/walters/src/github/containers/bootc/target/testbootc-cloud.qcow2
apparently caching a copy of that qcow2 in /var/tmp/tmt/testcloud/images/ but not invalidating that cache when the image changed.
Note that in the bootc world, a neat thing we emphasize is a whole flow of building a container image, and then optionally creating a disk image from it.
It might be nice to add tmt provisioning support that directly handled a case of going container -> disk, like:
provision:
how: virtual
bootc-container: localhost/image-under-test
And this would use e.g. https://github.com/osbuild/bootc-image-builder underneath (or we could streamline here the flow of bootc install to-existing-root); both are valid.
In a scenario like this, tmt could even create its own derived container image to inject infrastructure code, instead of live-mutating the system via cloud-init and shell.
Different topic: I wrote the coreos-assembler kola external tests which operate on a fundamentally different philosophy for the starting point: the test code is injected into the target as a systemd unit, and runs autonomously on its own, and the harness just monitors it. One special thing we added there is support for rebooting the system which reuses the APIs from the Debian autopkgtest framework. Is there such a thing in tmt? I found stuff like this but I don't know if/how it's mapped to test code.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status