~ separate test for build and run

This commit is contained in:
Lucas Briese 2019-10-15 12:40:02 +02:00
parent 4f40896ba7
commit 22af60a7fb
2 changed files with 24 additions and 13 deletions

22
test/testBuild.sh Normal file
View File

@ -0,0 +1,22 @@
#!/bin/bash
if [ "${DEBUGGING}" = "true" ]; then
set -o xtrace
else
DEBUGGING="false"
fi
set -o errexit
set -o nounset
set -o pipefail
echo "[testBuild][INFO]build"
docker rmi "jusito/docker-ttt:lgsm_debian" || true
docker build -t "jusito/docker-ttt:lgsm_debian" "./lgsm/"
docker rmi "jusito/docker-ttt:gmod_debian" || true
docker build -t "jusito/docker-ttt:gmod_debian" "./gmod/"
docker rmi "jusito/docker-ttt:gmod_ttt_debian" || true
docker build -t "jusito/docker-ttt:gmod_ttt_debian" "./TTT/"

View File

@ -12,16 +12,7 @@ set -o pipefail
#bash test/testStyle.sh
echo "[testBuild][INFO]build"
docker rmi "jusito/docker-ttt:lgsm_debian" || true
docker build -t "jusito/docker-ttt:lgsm_debian" "./lgsm/"
docker rmi "jusito/docker-ttt:gmod_debian" || true
docker build -t "jusito/docker-ttt:gmod_debian" "./gmod/"
docker rmi "jusito/docker-ttt:gmod_ttt_debian" || true
docker build -t "jusito/docker-ttt:gmod_ttt_debian" "./TTT/"
bash testBuild.sh
echo "[testRun][INFO]running"
@ -31,5 +22,3 @@ if ! docker run -ti --name "JusitoTesting" --rm -e TEST_MODE=true -e DEBUGGING="
fi
docker stop "JusitoTesting" || true
docker rm "JusitoTesting" || true
#docker run -ti --name "JusitoTesting" -p 27015:27015/udp -p 27015:27015/tcp --rm -e TEST_MODE=true -e DEBUGGING="$DEBUGGING" -e SERVER_PASSWORD="testpw" -e SERVER_MAX_PLAYERS="10" "jusito/docker-ttt:gmod_ttt_debian"