From 203d111f09afe9d76f69730a5518ab939ce5355f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Sat, 31 Mar 2018 21:07:11 +0200 Subject: [PATCH] Add support to build with frontend in image in tfw.sh --- hack/tfw.sh | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/hack/tfw.sh b/hack/tfw.sh index 316ae31..604814e 100755 --- a/hack/tfw.sh +++ b/hack/tfw.sh @@ -47,15 +47,24 @@ baseimage_releasename() printf "${VERSION}-${DATE}" } -build_test() +build_test_internal() { build_baseimage cd $TEST_PATH docker build -t $IMAGE_NAME \ -f ${BUILD_CONTEXT}/Dockerfile \ --build-arg BUILD_CONTEXT=$BUILD_CONTEXT \ - --build-arg NOFRONTEND=1 \ - . + ${ARGS} . +} + +build_test() +{ + ARGS="--build-arg NOFRONTEND=1" build_test_internal +} + +build_test_withfrontend() +{ + ARGS="--no-cache" build_test_internal } run_test() @@ -101,14 +110,18 @@ case $1 in build) build_test ;; + buildwithfrontend) + build_test_withfrontend + ;; start) start_test ;; *) echo "Usage: tfw.sh [buildtfw|build|start|buildstart]" - echo " |--- buildtfw: build TFW baseimage" - echo " |--- releasetfw: tag TFW baseimage and push to upstream" - echo " |--- build: build TFW test" - echo " |--- start: build & start TFW test" + echo " |--- buildtfw: build TFW baseimage" + echo " |--- releasetfw: tag TFW baseimage and push to upstream" + echo " |--- build: build TFW test" + echo " |--- buildwithfrontend: build TFW test, include frontend in image" + echo " |--- start: build & start TFW test" ;; esac