Skip to content

Commit

Permalink
ci: Add debugging for container
Browse files Browse the repository at this point in the history
  • Loading branch information
cgwalters committed Nov 17, 2023
1 parent be758fd commit d0d9c9f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ jobs:
with:
name: bootc.tar.zst
- name: Install
run: tar -xvf bootc.tar.zst
- name: Update host skopeo
run: |
echo 'deb http://cz.archive.ubuntu.com/ubuntu lunar main universe' | sudo tee -a /etc/apt/sources.list
sudo apt update
sudo apt upgrade skopeo
run: tar -xvf bootc.tar.zst && sha256sum usr/bin/bootc > bootc.sha256sum
#- name: Update host skopeo
# run: |
# echo 'deb http://cz.archive.ubuntu.com/ubuntu lunar main universe' | sudo tee -a /etc/apt/sources.list
# sudo apt update
# sudo apt upgrade skopeo
- name: Build derived image
run: |
mkdir -p usr/lib/bootc/install
Expand All @@ -122,15 +122,16 @@ jobs:
EOF
cat >Containerfile << 'EOF'
FROM quay.io/centos-boot/fedora-tier-1:eln
COPY usr usr/
COPY usr usr
EOF
sudo podman build -t localhost/testimage .
sudo podman run --rm -ti localhost/testimage ls -al /usr/lib/bootc/install
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
- name: Integration tests
run: |
set -xeuo pipefail
sudo podman run --rm -ti --privileged -v /:/target -v ./usr/bin/bootc:/usr/bin/bootc --pid=host --security-opt label=disable \
localhost/testimage env RUST_LOG=error,bootc_lib::install=debug bootc install-to-filesystem --skip-fetch-check --target-no-signature-verification \
sudo podman run --rm -ti --privileged -v /:/target --pid=host --security-opt label=disable \
localhost/testimage env RUST_LOG=error,bootc_lib::install=debug bootc install-to-filesystem --skip-fetch-check --target-no-signature-verification \
--karg=foo=bar --disable-selinux --replace=alongside /target
sudo grep foo=bar /boot/loader/entries/*.conf
sudo grep localtestkarg=somevalue /boot/loader/entries/*.conf
3 changes: 3 additions & 0 deletions lib/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,12 @@ pub(crate) mod config {
if let Some(install) = c.install {
tracing::debug!("Merging install config: {install:?}");
config.merge(install);
} else {
tracing::debug!("Config missing install: {path:?}");
}
} else {
config = c.install;
tracing::debug!("Using initial config: {config:?}");
}
}
config.ok_or_else(|| anyhow::anyhow!("No bootc/install config found; this operating system must define a default configuration to be installable"))
Expand Down

0 comments on commit d0d9c9f

Please sign in to comment.