Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 54a782d

Browse files
committed
while error fixed
1 parent deb0229 commit 54a782d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

deploy.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,22 @@ cd_deploy_status()
104104
{
105105
echo "check tatusget info aws deploy get-deployment --deployment-id $DEPLOYID"
106106
counter=0
107+
BUFFER=0
107108
DEPLOYMENT_STATUS=`aws deploy get-deployment --deployment-id "$DEPLOYID" | $JQ .deploymentInfo.status`
108-
while [[ "$DEPLOYMENT_STATUS" != "Succeeded" ]] || [[ "$DEPLOYMENT_STATUS" != "Failed" ]]
109+
if [ "$DEPLOYMENT_STATUS" = "Succeeded" ] || [ "$DEPLOYMENT_STATUS" = "Failed" ];
110+
then
111+
BUFFER=1
112+
fi
113+
while [ "$BUFFER" = "0" ]
109114
do
110115
echo "Current Deployment status : $DEPLOYMENT_STATUS"
111116
echo "Waiting for 15 sec to check the Deployment status...."
112117
sleep 15
113118
DEPLOYMENT_STATUS=`aws deploy get-deployment --deployment-id "$DEPLOYID" | $JQ .deploymentInfo.status`
119+
if [ "$DEPLOYMENT_STATUS" = "Succeeded" ] || [ "$DEPLOYMENT_STATUS" = "Failed" ];
120+
then
121+
BUFFER=1
122+
fi
114123
counter=`expr $counter + 1`
115124
if [[ $counter -gt $COUNTER_LIMIT ]] ; then
116125
echo "Deployment does not reach staedy state with in 600 seconds. Please check"

0 commit comments

Comments
 (0)