1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-11-14 16:07:18 +00:00

Add support for running TFW without a new build

This commit is contained in:
Kristóf Tóth 2018-05-18 16:14:31 +02:00
parent fb2814c3a2
commit 8e0537974e

View File

@ -104,12 +104,6 @@ run_test()
-e AVATAO_SECRET=$AVATAO_SECRET $IMAGE_NAME
}
build_and_run_test()
{
build_test
run_test $@
}
run_frontend()
{
FRONTEND_IN_TEST="${TEST_PATH}/solvable/frontend"
@ -127,7 +121,8 @@ start_test()
trap 'exit' INT TERM
trap 'kill 0' EXIT
[[ "${RUN_FRONTEND:-1}" == "1" ]] && run_frontend &
build_and_run_test $@
[[ "${BUILD:-1}" == "1" ]] && build_test
run_test $@
wait
}
@ -135,9 +130,15 @@ case ${1:-} in
start)
RUN_FRONTEND=1 start_test ${@:2}
;;
run)
BUILD=0 RUN_FRONTEND=1 start_test ${@:2}
;;
startcontainer)
RUN_FRONTEND=0 start_test ${@:2}
;;
runcontainer)
BUILD=0 RUN_FRONTEND=0 start_test ${@:2}
;;
buildtfw)
build_baseimage
;;
@ -152,8 +153,10 @@ case ${1:-} in
;;
*)
echo "Usage: tfw.sh [start|buildtfw|build|buildwithfrontend|releasetfw]"
echo " |--- start: build & start TFW test and Angular frontend"
echo " |--- startcontainer: build & start TFW test, container only"
echo " |--- start: build & run TFW test and Angular frontend"
echo " |--- run: run TFW test and Angular frontend"
echo " |--- startcontainer: build & run TFW test, container only"
echo " |--- runcontainer: run TFW test, container only"
echo " |--- buildtfw: build TFW baseimage"
echo " |--- build: build TFW baseimage and test"
echo " |--- buildwithfrontend: build TFW baseimage and test, include frontend in image"