From 62fd8704fbf4693847f5b1cccf1651115d19c49e Mon Sep 17 00:00:00 2001 From: progyoung Date: Fri, 25 Nov 2022 13:57:23 +0800 Subject: [PATCH] [#152] modify pinpoint-flink-job.jar just one time when the container is created --- pinpoint-flink/docker-bin/docker-entrypoint.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pinpoint-flink/docker-bin/docker-entrypoint.sh b/pinpoint-flink/docker-bin/docker-entrypoint.sh index e0c36be..f79408c 100755 --- a/pinpoint-flink/docker-bin/docker-entrypoint.sh +++ b/pinpoint-flink/docker-bin/docker-entrypoint.sh @@ -2,14 +2,16 @@ # In flink version < 1.11 we can't use "job cluster" because it's not yet available if [ "$1" = "standalone-job" ]; then - cd /build - zip -d pinpoint-flink-job.jar "profiles/release/*.properties" - sed -i -e "s/#PINPOINT_ZOOKEEPER_ADDRESS#/${PINPOINT_ZOOKEEPER_ADDRESS}/g" profiles/release/* - zip -r pinpoint-flink-job.jar profiles/ - cd - - - mv /build/pinpoint-flink-job.jar pinpoint-flink-job.jar + if [ -e /build/pinpoint-flink-job.jar ]; then + cd /build + zip -d pinpoint-flink-job.jar "profiles/release/*.properties" + sed -i -e "s/#PINPOINT_ZOOKEEPER_ADDRESS#/${PINPOINT_ZOOKEEPER_ADDRESS}/g" profiles/release/* + zip -r pinpoint-flink-job.jar profiles/ + cd - + mv /build/pinpoint-flink-job.jar pinpoint-flink-job.jar + fi + shift /docker-entrypoint.sh jobmanager &