mirror of
				https://github.com/avatao-content/test-tutorial-framework
				synced 2025-10-31 22:22:55 +00:00 
			
		
		
		
	Add support to build with frontend in image in tfw.sh
This commit is contained in:
		
							
								
								
									
										19
									
								
								hack/tfw.sh
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								hack/tfw.sh
									
									
									
									
									
								
							| @@ -47,15 +47,24 @@ baseimage_releasename() | |||||||
|     printf "${VERSION}-${DATE}" |     printf "${VERSION}-${DATE}" | ||||||
| } | } | ||||||
|  |  | ||||||
| build_test() | build_test_internal() | ||||||
| { | { | ||||||
|     build_baseimage |     build_baseimage | ||||||
|     cd $TEST_PATH |     cd $TEST_PATH | ||||||
|     docker build -t $IMAGE_NAME                           \ |     docker build -t $IMAGE_NAME                           \ | ||||||
|                  -f ${BUILD_CONTEXT}/Dockerfile           \ |                  -f ${BUILD_CONTEXT}/Dockerfile           \ | ||||||
|                  --build-arg BUILD_CONTEXT=$BUILD_CONTEXT \ |                  --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() | run_test() | ||||||
| @@ -101,6 +110,9 @@ case $1 in | |||||||
|     build) |     build) | ||||||
|         build_test |         build_test | ||||||
|     ;; |     ;; | ||||||
|  |     buildwithfrontend) | ||||||
|  |         build_test_withfrontend | ||||||
|  |     ;; | ||||||
|     start) |     start) | ||||||
|         start_test |         start_test | ||||||
|     ;;  |     ;;  | ||||||
| @@ -109,6 +121,7 @@ case $1 in | |||||||
|         echo "          |--- buildtfw:          build TFW baseimage" |         echo "          |--- buildtfw:          build TFW baseimage" | ||||||
|         echo "          |--- releasetfw:        tag TFW baseimage and push to upstream" |         echo "          |--- releasetfw:        tag TFW baseimage and push to upstream" | ||||||
|         echo "          |--- build:             build TFW test" |         echo "          |--- build:             build TFW test" | ||||||
|  |         echo "          |--- buildwithfrontend: build TFW test, include frontend in image" | ||||||
|         echo "          |--- start:             build & start TFW test" |         echo "          |--- start:             build & start TFW test" | ||||||
|     ;; |     ;; | ||||||
| esac | esac | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user