imgtestlib: use image-builder cmd, drop cmd/build/ (HMS-10298)#2462
imgtestlib: use image-builder cmd, drop cmd/build/ (HMS-10298)#2462avitova wants to merge 4 commits into
Conversation
|
|
||
| cmd = [ | ||
| "sudo", "-E", "./bin/image-builder", "build", image_type, | ||
| "--config", config_path, |
There was a problem hiding this comment.
Where does --config come from?
There was a problem hiding this comment.
Yeah, you are right, this was never supported. But tests passed locally previously; that is odd. I believe we ignore non-existent flags then?
|
You'll probably want to bump the Schutzbot seed if changing the build script I think? |
fbe0efc to
2490225
Compare
Wire new CLI flags --bootc-remote and --image-size through manifest so that test configs can be built via image-builder build/manifest. Related: HMS-10855
This commit swaps usage of build in tests to using image-builder directly. After swapping from build to image-builder in tests, it is possible to use options instead of solely just a config file. This commit extracts options from the json config: --ostree-ref, --ostree-url, --ostree-parent, --bootc-installer-payload-ref, --bootc-remote, --image-size, and --extra-repo. It also extracts the blueprint part of the config into a standalone file, so that it can be used for building with image-builder. Related: HMS-10855
eb1dfd3 to
c657c12
Compare
ec75923 to
b172aa9
Compare
After swapping to image-builder from build, the CI for cross architecture integration test is failing with `fuse: device not found, try 'modprobe fuse' first`. This commit ensures it is present before running integration tests.
b172aa9 to
725109a
Compare
|
While working on #2467, I saw this in the old bootc-image-builder github actions: - name: Workaround podman issues in GH actions
run: |
# see https://github.com/osbuild/bootc-image-builder/issues/446
sudo rm -rf /var/lib/containers/storage
sudo mkdir -p /etc/containers
echo -e "[storage]\ndriver = \"overlay\"\nrunroot = \"/run/containers/storage\"\ngraphroot = \"/var/lib/containers/storage\"" | sudo tee /etc/containers/storage.confMight be what's needed to get that cross-arch build to work. |
| manifestCmd.Flags().String("bootc-installer-payload-ref", "", `bootc installer payload ref`) | ||
| manifestCmd.Flags().String("bootc-default-fs", "", `default filesystem to use for the bootc install (e.g. ext4)`) | ||
| manifestCmd.Flags().Bool("bootc-no-default-kernel-args", false, `don't use the default kernel arguments`) | ||
| manifestCmd.Flags().Bool("bootc-remote", false, `use org.osbuild.skopeo sources instead of containers-storage`) |
There was a problem hiding this comment.
I think using the osbuild stage names here isn't very helpful. We don't expect users of the CLI to know about osbuild internals so it's a bit of a layer violation, even though they appear in the output.
It'd be better to describe it in general terms, like:
"Pull bootc container from remote location instead of using it from local container storage"
The option could also use some workshopping. Maybe bootc-pull-container?
I saw more possible approaches, such as splitting configs into two files: blueprint, and the options part. However, creating a temporary file for blueprint in /tmp sounds like a good option and keeps things clean. Let me know what you guys think.