Skip to content

Commit

Permalink
[CHORE} CD시에 프로세스가 죽을 때까지 반복문으로 대기하도록 변경 #95
Browse files Browse the repository at this point in the history
  • Loading branch information
ddongseop committed Aug 14, 2023
1 parent 599d8f6 commit 577fca8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/umbba-api/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ then
else
echo "[$NOW_TIME] kill -15 $IDLE_PID"
kill -15 $IDLE_PID
sleep 10

while ps -p $IDLE_PID > /dev/null; do
sleep 1
done
echo "[$NOW_TIME] 애플리케이션이 정상 종료되었습니다."
fi

echo "[$NOW_TIME] $IDLE_PROFILE 배포"
Expand Down
4 changes: 4 additions & 0 deletions scripts/umbba-notification/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ TARGET_PID=$(lsof -Fp -i TCP:${TARGET_PORT} | grep -Po 'p[0-9]+' | grep -Po '[0-
if [ ! -z ${TARGET_PID} ]; then
echo "[$NOW_TIME] Kill WAS running at ${TARGET_PORT}." >> /home/ubuntu/notification-server/deploy.log
sudo kill -15 ${TARGET_PID}
while ps -p $TARGET_PID > /dev/null; do
sleep 1
done
echo "[$NOW_TIME] 애플리케이션이 정상 종료되었습니다."
fi

nohup java -jar -Duser.timezone=Asia/Seoul -Dspring.profiles.active=notification $BUILD_PATH >> /home/ubuntu/notification-server/deploy.log 2>/home/ubuntu/notification-server/deploy_err.log &
Expand Down

0 comments on commit 577fca8

Please sign in to comment.