From 8e0537974ed6486a6c4b77f0d8a9e7cc9c492f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 18 May 2018 16:14:31 +0200 Subject: [PATCH] Add support for running TFW without a new build --- hack/tfw.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/hack/tfw.sh b/hack/tfw.sh index a3b61ed..55e9ac1 100755 --- a/hack/tfw.sh +++ b/hack/tfw.sh @@ -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"