6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 13:33:07 +01:00
firebird-qa/run-docker.sh

26 lines
768 B
Bash
Raw Normal View History

#!/bin/sh
set -e
# Syntax:
# Run this script passing environment variables:
# FBQA_OUT=/path/to/out FBQA_INSTALLER=/path/to/Firebird.tar.gz ./run-docker.sh
THIS_DIR=`readlink -f $0`
THIS_DIR=`dirname $THIS_DIR`
if [ -z "$FBQA_OUT" ]; then
echo \$FBQA_OUT is not defined.
fi
if [ -z "$FBQA_INSTALLER" ]; then
echo \$FBQA_INSTALLER is not defined.
fi
if [ -z "$FBQA_OUT" ] || [ -z "$FBQA_INSTALLER" ]; then
exit 1
fi
docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) --progress=plain -t firebird-qa $THIS_DIR
mkdir -p $FBQA_OUT/tests
docker run --user $(id -u) --rm -v `realpath $FBQA_OUT`:/qa-out -v `realpath $FBQA_OUT/tests`:/qa-run/out/tests -v `realpath $THIS_DIR`:/qa -v `realpath $FBQA_INSTALLER`:/firebird-installer.tar.gz firebird-qa "$@"