2022-06-21 09:02:07 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2022-06-21 10:07:13 +00:00
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
case $1 in
|
|
|
|
--parallel)
|
|
|
|
CONTAINER_ARGS="--workers auto $CONTAINER_ARGS"
|
|
|
|
shift;;
|
|
|
|
-x)
|
|
|
|
CONTAINER_ARGS="-x $CONTAINER_ARGS"
|
|
|
|
shift;;
|
|
|
|
--no-cache)
|
|
|
|
NO_CACHE=--no-cache
|
|
|
|
shift;;
|
|
|
|
*)
|
|
|
|
echo "Unknown argument \"$1\""
|
|
|
|
exit 1
|
|
|
|
shift;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
mkdir -p podman/testdata/git
|
|
|
|
git ls-tree --full-tree -r HEAD --name-only | rsync -lptgoDv --delete . --files-from - podman/testdata/git/
|
|
|
|
#git clone --depth 1 . podman/testdata/git
|
2022-06-21 09:02:07 +00:00
|
|
|
|
2022-06-21 10:26:38 +00:00
|
|
|
for distro in ubuntu-old ubuntu arch
|
2022-06-21 09:02:07 +00:00
|
|
|
do
|
2022-06-21 10:07:13 +00:00
|
|
|
podman build $NO_CACHE -t gerbonara-$distro-testenv -f podman/$distro-testenv
|
2022-06-21 09:02:07 +00:00
|
|
|
mkdir -p /tmp/gerbonara-test-out
|
2022-06-21 09:31:17 +00:00
|
|
|
podman run --mount type=bind,src=podman/testdata,dst=/data,ro --mount type=bind,src=/tmp/gerbonara-test-out,dst=/out gerbonara-$distro-testenv /data/testscript.sh $CONTAINER_ARGS
|
2022-06-21 09:02:07 +00:00
|
|
|
done
|
|
|
|
|