mirror of
https://github.com/containers/bootc.git
synced 2026-02-05 15:45:53 +01:00
To workaround https://github.com/bootc-dev/bcvk/issues/174, will build `bootc-integration-coreos` container firstly and save it to `bootc.tar`, then load it to install. Signed-off-by: Huijing Hei <hhei@redhat.com>
44 lines
1.4 KiB
Docker
44 lines
1.4 KiB
Docker
# Build a container image that has extra testing stuff in it, such
|
|
# as nushell, some preset logically bound images, etc. This expects
|
|
# to create an image derived FROM localhost/bootc which was created
|
|
# by the Dockerfile at top.
|
|
|
|
FROM scratch as context
|
|
# We only need this stuff in the initial context
|
|
COPY . /
|
|
|
|
# An intermediate layer which caches the extended RPMS
|
|
FROM localhost/bootc as extended
|
|
# And this layer has additional stuff for testing, such as nushell etc.
|
|
RUN --mount=type=bind,from=context,target=/run/context <<EORUN
|
|
set -xeuo pipefail
|
|
cd /run/context/
|
|
./provision-derived.sh
|
|
EORUN
|
|
|
|
# And the configs
|
|
FROM extended
|
|
ARG SKIP_CONFIGS
|
|
RUN --mount=type=bind,from=context,target=/run/context <<EORUN
|
|
# Do not need the configs when testing installation on ostree
|
|
echo "SKIP_CONFIGS=${SKIP_CONFIGS:-<unset>}"
|
|
if [ -n "${SKIP_CONFIGS:-}" ]; then
|
|
echo "Skipping configs installation"
|
|
exit 0
|
|
fi
|
|
set -xeuo pipefail
|
|
cd /run/context
|
|
# For test-22-logically-bound-install
|
|
cp -a lbi/usr/. /usr
|
|
for x in curl.container curl-base.image podman.image; do
|
|
ln -s /usr/share/containers/systemd/$x /usr/lib/bootc/bound-images.d/$x
|
|
done
|
|
|
|
# Add some testing kargs into our dev builds
|
|
install -D -t /usr/lib/bootc/kargs.d test-kargs/*
|
|
# Also copy in some default install configs we use for testing
|
|
install -D -t /usr/lib/bootc/install/ install-test-configs/*
|
|
# Finally, test our own linting
|
|
bootc container lint --fatal-warnings
|
|
EORUN
|