mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 22:07:17 +00:00
Add support for running TFW without a new build
This commit is contained in:
parent
fb2814c3a2
commit
8e0537974e
21
hack/tfw.sh
21
hack/tfw.sh
@ -104,12 +104,6 @@ run_test()
|
|||||||
-e AVATAO_SECRET=$AVATAO_SECRET $IMAGE_NAME
|
-e AVATAO_SECRET=$AVATAO_SECRET $IMAGE_NAME
|
||||||
}
|
}
|
||||||
|
|
||||||
build_and_run_test()
|
|
||||||
{
|
|
||||||
build_test
|
|
||||||
run_test $@
|
|
||||||
}
|
|
||||||
|
|
||||||
run_frontend()
|
run_frontend()
|
||||||
{
|
{
|
||||||
FRONTEND_IN_TEST="${TEST_PATH}/solvable/frontend"
|
FRONTEND_IN_TEST="${TEST_PATH}/solvable/frontend"
|
||||||
@ -127,7 +121,8 @@ start_test()
|
|||||||
trap 'exit' INT TERM
|
trap 'exit' INT TERM
|
||||||
trap 'kill 0' EXIT
|
trap 'kill 0' EXIT
|
||||||
[[ "${RUN_FRONTEND:-1}" == "1" ]] && run_frontend &
|
[[ "${RUN_FRONTEND:-1}" == "1" ]] && run_frontend &
|
||||||
build_and_run_test $@
|
[[ "${BUILD:-1}" == "1" ]] && build_test
|
||||||
|
run_test $@
|
||||||
wait
|
wait
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,9 +130,15 @@ case ${1:-} in
|
|||||||
start)
|
start)
|
||||||
RUN_FRONTEND=1 start_test ${@:2}
|
RUN_FRONTEND=1 start_test ${@:2}
|
||||||
;;
|
;;
|
||||||
|
run)
|
||||||
|
BUILD=0 RUN_FRONTEND=1 start_test ${@:2}
|
||||||
|
;;
|
||||||
startcontainer)
|
startcontainer)
|
||||||
RUN_FRONTEND=0 start_test ${@:2}
|
RUN_FRONTEND=0 start_test ${@:2}
|
||||||
;;
|
;;
|
||||||
|
runcontainer)
|
||||||
|
BUILD=0 RUN_FRONTEND=0 start_test ${@:2}
|
||||||
|
;;
|
||||||
buildtfw)
|
buildtfw)
|
||||||
build_baseimage
|
build_baseimage
|
||||||
;;
|
;;
|
||||||
@ -152,8 +153,10 @@ case ${1:-} in
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: tfw.sh [start|buildtfw|build|buildwithfrontend|releasetfw]"
|
echo "Usage: tfw.sh [start|buildtfw|build|buildwithfrontend|releasetfw]"
|
||||||
echo " |--- start: build & start TFW test and Angular frontend"
|
echo " |--- start: build & run TFW test and Angular frontend"
|
||||||
echo " |--- startcontainer: build & start TFW test, container only"
|
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 " |--- buildtfw: build TFW baseimage"
|
||||||
echo " |--- build: build TFW baseimage and test"
|
echo " |--- build: build TFW baseimage and test"
|
||||||
echo " |--- buildwithfrontend: build TFW baseimage and test, include frontend in image"
|
echo " |--- buildwithfrontend: build TFW baseimage and test, include frontend in image"
|
||||||
|
Loading…
Reference in New Issue
Block a user