Files
jakub-bochenski 5b2e7c0d85 fix: Use exec for better PID 1 handling (#2156)
Also pass the arguments along to the java execution
Previously the arguments were silently dropped

Signed-off-by: jakub-bochenski <kuba.bochenski@gmail.com>
Signed-off-by: jakub <j.bochenski@zoovu.com>
2025-02-21 14:06:46 +01:00

24 lines
585 B
Bash
Executable File

#!/bin/bash
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
echo "Running Spring Cloud Contract Stub Runner"
ADDITIONAL_OPTS="${ADDITIONAL_OPTS:-}"
MESSAGING_TYPE="${MESSAGING_TYPE:-}"
if [[ "${MESSAGING_TYPE}" != "" ]]; then
echo "Messaging type passed, will active thin profile [${MESSAGING_TYPE}]"
ADDITIONAL_OPTS="${ADDITIONAL_OPTS} --thin.profile=${MESSAGING_TYPE}"
fi
echo "Please wait for the dependencies to be downloaded..."
exec \
java \
-Djava.security.egd=file:/dev/./urandom \
-jar /home/scc/stub-runner-boot.jar \
${ADDITIONAL_OPTS} \
"$@"