particle-os-cli/integration-tests/mock-scripts/podman
Gerald Pinder 3a0be4099a
feat: Add bootc support (#448)
Adds support for using `bootc` as the preferred method for booting from
a locally created image. This new method gets rid of the need to create
a tarball and move it to the correct place and instead it will make use
of `podman scp` which copies the image to the root `containers-storage`
and then has `rpm-ostree` and `bootc` boot from that store.

Closes #418 
Closes #200
2025-08-09 14:05:59 -04:00

25 lines
665 B
Bash
Executable file

#!/bin/bash
print_version_json() {
local version="4.0.0"
printf '{"Client":{"Version": "%s"}}\n' "$version"
}
main() {
if [[ "$1" == "version" && "$2" == "-f" && "$3" == "json" ]]; then
print_version_json
elif [[ "$1" == "build" && "$7" == *"cli_test.tar.gz" ]]; then
tarpath=$(echo "$7" | awk -F ':' '{print $2}')
echo "Exporting image to a tarball (JK JUST A MOCK!)"
echo "${tarpath}"
touch $tarpath
elif [[ "$1" == "image" && "$2" == "scp" ]]; then
echo "Copying image $3 to $4"
elif [[ "$1" == "rmi" && "$2" == "$BB_TEST_LOCAL_IMAGE" ]]; then
echo "Removing image $2"
else
echo 'Running podman'
fi
}
main "$@"