debian-koji-osbuild/test/build-container.sh
Christian Kellner c826db38e7 test: match container version to host
Instead of just using the "latest" container everywhere, which will
change every time a new release is made, add a build argument to
specify the version and then match that version to the host in all
the build scripts. This will make it possible to use the tests for
gating, and ensure that we test the plugins on the OS version that
is targeted.
2020-11-19 11:22:54 +00:00

22 lines
484 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
TEST_PATH=${1:-test}
# this script must be run as root
if [ $UID != 0 ]; then
echo This script must be run as root.
exit 1
fi
source /etc/os-release
podman build \
--build-arg version=${VERSION_ID} \
-t koji.hub \
-f ${TEST_PATH}/container/hub/Dockerfile.${ID} $TEST_PATH
podman build \
--build-arg version=${VERSION_ID} \
-t koji.builder \
-f ${TEST_PATH}/container/builder/Dockerfile.${ID} $TEST_PATH