forked from cockpit-project/cockpit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We want to test deploying cockpit rpms in bootc images. This will prevent hiccups like cockpit-project#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
- Loading branch information
1 parent
0dfb58e
commit b2a67f6
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/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 -f - . <<EOF | ||
FROM localhost:5000/bootc:latest | ||
COPY ./rpms /tmp/rpms | ||
RUN dnf install -y /tmp/rpms/*.rpm && dnf clean all | ||
RUN rm -r /tmp/rpms | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters