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
34 lines
774 B
Bash
Executable file
34 lines
774 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
if [ "$1" = "rebase" ]; then
|
|
if [ "$2" = "ostree-unverified-image:containers-storage:$BB_TEST_LOCAL_IMAGE" ]; then
|
|
echo "Rebased to local image $BB_TEST_LOCAL_IMAGE"
|
|
else
|
|
echo "Failed to rebase"
|
|
exit 1
|
|
fi
|
|
elif [ "$1" = "upgrade" ]; then
|
|
echo "Performing upgrade for $BB_TEST_LOCAL_IMAGE"
|
|
elif [ "$1" = "status" ]; then
|
|
cat <<EOF
|
|
{
|
|
"deployments": [
|
|
{
|
|
"container-image-reference": "ostree-image-signed:docker://ghcr.io/blue-build/cli/test",
|
|
"booted": true,
|
|
"staged": false
|
|
},
|
|
{
|
|
"container-image-reference": "ostree-image-signed:docker://ghcr.io/blue-build/cli/test:last",
|
|
"booted": false,
|
|
"staged": false
|
|
}
|
|
]
|
|
}
|
|
EOF
|
|
else
|
|
echo "Arg $1 is not recognized"
|
|
exit 1
|
|
fi
|