Messaging support for stub runner boot

With this change by adding --thin.profile=kafka or --thin.profile=rabbit we're able to turn on messaging support for stub runner boot.

Also for Docker, you will be able to pass MESSAGING_TYPE env var with either rabbit or kafka as a value and we'll run the messaging support for you.

fixes gh-1468
This commit is contained in:
Marcin Grzejszczak
2020-08-07 17:49:10 +02:00
parent 825ccbf305
commit 84cfb7488a
2 changed files with 18 additions and 1 deletions

View File

@@ -6,4 +6,12 @@ set -o nounset
set -o pipefail
echo "Running Spring Cloud Contract Stub Runner"
java -Djava.security.egd=file:/dev/./urandom -jar /stub-runner-boot.jar
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
java -Djava.security.egd=file:/dev/./urandom -jar /stub-runner-boot.jar ${ADDITIONAL_OPTS}