pinpoint-docker-fork/pinpoint-flink/docker-bin/docker-entrypoint.sh

23 lines
580 B
Bash
Raw Normal View History

2021-01-13 07:58:02 +00:00
#!/bin/bash
# In flink version < 1.11 we can't use "job cluster" because it's not yet available
if [ "$1" = "standalone-job" ]; then
cd /build
2021-03-25 09:09:58 +00:00
zip -d pinpoint-flink-job.jar "profiles/release/*.properties"
2021-01-13 07:58:02 +00:00
sed -i -e "s/#PINPOINT_ZOOKEEPER_ADDRESS#/${PINPOINT_ZOOKEEPER_ADDRESS}/g" profiles/release/*
2021-03-25 09:09:58 +00:00
zip -r pinpoint-flink-job.jar profiles/
2021-01-13 07:58:02 +00:00
cd -
2021-03-25 09:09:58 +00:00
mv /build/pinpoint-flink-job.jar pinpoint-flink-job.jar
2021-01-13 07:58:02 +00:00
shift
/docker-entrypoint.sh jobmanager &
sleep 5
if ! flink list | grep 'RUNNING'; then
flink run $@
fi
wait
2021-01-13 07:58:02 +00:00
else
exec /docker-entrypoint.sh $@
fi