Skip to content

Commit be5fb81

Browse files
author
Nicolas Huray
committed
Move exit condition when deployment failed
1 parent b952733 commit be5fb81

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

run.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,11 @@ if [ 'true' = "$DEPLOYMENT_OVERVIEW" ]; then
358358
error "Deployment of application '$APPLICATION_NAME' on deployment group '$DEPLOYMENT_GROUP' failed: $ERROR_MESSAGE"
359359
exit 1
360360
fi
361+
# Deployment succeeded
362+
if [ "$STATUS" = 'Succeeded' ]; then
363+
success "Deployment of application '$APPLICATION_NAME' on deployment group '$DEPLOYMENT_GROUP' succeeded"
364+
break
365+
fi
361366

362367
# Deployment Overview
363368
IN_PROGRESS=$(echo $DEPLOYMENT_GET_OUTPUT | jsonValue 'InProgress' | tr -d '\r\n' | tr -d ' ')
@@ -366,13 +371,6 @@ if [ 'true' = "$DEPLOYMENT_OVERVIEW" ]; then
366371
SUCCEEDED=$(echo $DEPLOYMENT_GET_OUTPUT | jsonValue 'Succeeded' | tr -d '\r\n' | tr -d ' ')
367372
FAILED=$(echo $DEPLOYMENT_GET_OUTPUT | jsonValue 'Failed' | tr -d '\r\n' | tr -d ' ')
368373
echo "| In Progress: $IN_PROGRESS | Pending: $PENDING | Skipped: $SKIPPED | Succeeded: $SUCCEEDED | Failed: $FAILED |"
369-
370-
# Deployment succeeded
371-
if [ "$STATUS" = 'Succeeded' ]; then
372-
success "Deployment of application '$APPLICATION_NAME' on deployment group '$DEPLOYMENT_GROUP' succeeded"
373-
break
374-
fi
375-
376374
done
377375
else
378376
info "Deployment of application '$APPLICATION_NAME' on deployment group '$DEPLOYMENT_GROUP' in progress"

0 commit comments

Comments
 (0)