mirror of
https://github.com/VinylDNS/vinyldns
synced 2025-08-22 02:02:14 +00:00
Update sbt script to allow for debugging [ci skip]
This commit is contained in:
parent
74bde4381e
commit
43886deee9
16
build/sbt.sh
16
build/sbt.sh
@ -7,10 +7,12 @@ usage() {
|
|||||||
echo "USAGE: sbt.sh [options]"
|
echo "USAGE: sbt.sh [options]"
|
||||||
echo -e "\t-d, --debug enable debugging"
|
echo -e "\t-d, --debug enable debugging"
|
||||||
echo -e "\t-p, --debug-port the debug port (default: 5021)"
|
echo -e "\t-p, --debug-port the debug port (default: 5021)"
|
||||||
|
echo -e "\t-e, --expose expose one or more ports using the Docker format for exposing ports"
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_SETTINGS=""
|
DEBUG_SETTINGS=""
|
||||||
DEBUG_PORT=5021
|
DEBUG_PORT=5021
|
||||||
|
EXPOSE_PORTS=""
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--debug | -d)
|
--debug | -d)
|
||||||
@ -22,6 +24,11 @@ while [[ $# -gt 0 ]]; do
|
|||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--expose | -e)
|
||||||
|
EXPOSE_PORTS="${EXPOSE_PORTS} -p \"$2\""
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
@ -30,8 +37,13 @@ while [[ $# -gt 0 ]]; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ "${DEBUG_SETTINGS}" != "" ]; then
|
if [ "${DEBUG_SETTINGS}" != "" ]; then
|
||||||
DEBUG_SETTINGS="${DEBUG_SETTINGS},address=${DEBUG_PORT}\" -p \"${DEBUG_PORT}:${DEBUG_PORT}\""
|
DEBUG_SETTINGS="${DEBUG_SETTINGS},address=${DEBUG_PORT}\""
|
||||||
|
|
||||||
|
# If given a debug port outside of the default range, expose the selected port
|
||||||
|
if [[ "$DEBUG_PORT" -lt 5020 ]] || [[ "$DEBUG_PORT" -gt 5030 ]]; then
|
||||||
|
DEBUG_SETTINGS="${DEBUG_SETTINGS} -p \"${DEBUG_PORT}:${DEBUG_PORT}\""
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$DIR/../test/api/integration"
|
cd "$DIR/../test/api/integration"
|
||||||
make build DOCKER_PARAMS="--build-arg SKIP_API_BUILD=true" && make run-local WITH_ARGS="sbt" DOCKER_PARAMS="-p \"5020-5030:5020-5030\" ${DEBUG_SETTINGS} -e RUN_SERVICES=none --env-file \"$DIR/../test/api/integration/.env.integration\""
|
make build DOCKER_PARAMS="--build-arg SKIP_API_BUILD=true" && make run-local WITH_ARGS="sbt" DOCKER_PARAMS="-p \"5020-5030:5020-5030\" ${DEBUG_SETTINGS} ${EXPOSE_PORTS} -e RUN_SERVICES=none --env-file \"$DIR/../test/api/integration/.env.integration\""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user