mirror of
https://github.com/cockpit-project/cockpit.git
synced 2026-11-03 21:49:50 -09:00
We want to test deploying cockpit rpms in bootc images. This will prevent hiccups like https://github.com/cockpit-project/cockpit/issues/21201 in the future and also test a lot of OS subsystems. The centos-9-bootc bots image includes its own deployment container image, so we can easily derive an image with our locally built RPMs included. https://issues.redhat.com/browse/COCKPIT-1237
25 lines
777 B
Bash
25 lines
777 B
Bash
#!/bin/sh
|
|
set -eux
|
|
|
|
cd /var/tmp/
|
|
|
|
# bootc images have their own deployed image in a local registry
|
|
podman run -d --rm --name ostree-registry -p 5000:5000 -v /var/lib/cockpit-test-registry/:/var/lib/registry localhost/test-registry
|
|
|
|
# build updated bootc image with our RPMs
|
|
podman build -t localhost/bootc-test --layers=false -f - . <<EOF
|
|
FROM localhost:5000/bootc:latest
|
|
COPY ./rpms /tmp/rpms
|
|
RUN rpm --upgrade --verbose /tmp/rpms/*.rpm && rm -r /tmp/rpms
|
|
COPY ./playground /usr/share/cockpit/playground
|
|
EOF
|
|
|
|
# deploy it
|
|
bootc switch --transport containers-storage localhost/bootc-test
|
|
|
|
# clean up
|
|
podman rm -ft0 ostree-registry
|
|
podman rmi localhost:5000/bootc localhost/bootc-test
|
|
|
|
# ensure that we don't accidentally test with container
|
|
podman rmi quay.io/cockpit/ws:latest
|