#!/bin/bash MOUNT_INPUTS=type=bind,source=../test-inputs,destination=/var/gavo-inputs die() { echo $@ exit 1 } function make-containerfile() { sed -e "s/#ROOT_IMAGE#/$ROOT_IMAGE/;\ s/#SOURCES_LIST#/$SOURCES_LIST/;\ s/#EXTRA_COMMANDS#/$EXTRA_COMMANDS/;\ s/#PGVERSION#/$PGVERSION/" < Containerfile.in >Containerfile } function run-container() { eatmydata podman build -t=$1 . \ || die "*** Container build failed" eatmydata podman run -p 127.0.0.1:8080:8080 --mount="$MOUNT_INPUTS" -it $1 } function test-stable() { ROOT_IMAGE=debian:stable SOURCES_LIST=sources.list.stable EXTRA_COMMANDS="RUN apt install python3-multipart" PGVERSION=15 make-containerfile run-container stable } function test-oldstable() { ROOT_IMAGE=debian:oldstable SOURCES_LIST=sources.list.oldstable EXTRA_COMMANDS="RUN apt install python3-multipart" PGVERSION=13 make-containerfile run-container oldstable } function test-unstable() { ROOT_IMAGE=debian:unstable SOURCES_LIST=sources.list.unstable EXTRA_COMMANDS="RUN apt-get install python3-python-multipart" PGVERSION=17 make-containerfile run-container unstable } #test-oldstable #test-stable test-unstable