mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-15 01:57:18 +00:00
Implement support for optional arguments to docker run inside script
This commit is contained in:
parent
f4bbf5477d
commit
cb6f670329
@ -99,13 +99,14 @@ run_test()
|
|||||||
docker run --rm \
|
docker run --rm \
|
||||||
-p $TEST_PORT:$TEST_PORT \
|
-p $TEST_PORT:$TEST_PORT \
|
||||||
${mount_volumes} \
|
${mount_volumes} \
|
||||||
|
${@:-} \
|
||||||
-e AVATAO_SECRET=$AVATAO_SECRET $IMAGE_NAME
|
-e AVATAO_SECRET=$AVATAO_SECRET $IMAGE_NAME
|
||||||
}
|
}
|
||||||
|
|
||||||
build_and_run_test()
|
build_and_run_test()
|
||||||
{
|
{
|
||||||
build_test
|
build_test
|
||||||
run_test
|
run_test $@
|
||||||
}
|
}
|
||||||
|
|
||||||
run_frontend()
|
run_frontend()
|
||||||
@ -124,7 +125,7 @@ start_test()
|
|||||||
{
|
{
|
||||||
trap 'exit' INT TERM
|
trap 'exit' INT TERM
|
||||||
trap 'kill 0' EXIT
|
trap 'kill 0' EXIT
|
||||||
run_frontend & build_and_run_test
|
run_frontend & build_and_run_test $@
|
||||||
wait
|
wait
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +143,7 @@ case ${1:-} in
|
|||||||
build_test_withfrontend
|
build_test_withfrontend
|
||||||
;;
|
;;
|
||||||
start)
|
start)
|
||||||
start_test
|
start_test ${@:2}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: tfw.sh [start|buildtfw|build|buildwithfrontend|releasetfw]"
|
echo "Usage: tfw.sh [start|buildtfw|build|buildwithfrontend|releasetfw]"
|
||||||
|
Loading…
Reference in New Issue
Block a user