Skip to content

Commit eb9d4db

Browse files
VacorisiBotPeaches
andauthored
fix: handle missing list-deployments error (#68)
* fix: handle missing list-deployments error * build: added error message to list-deployments * refactor: adjust message on list-deployments error Co-authored-by: Connor Tumbleson <connor@sourcetoad.com>
1 parent e524961 commit eb9d4db

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

deploy.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,14 @@ echo "::debug::Removed old local ZIP Archive."
119119

120120
# 4) Start the CodeDeploy
121121
function getActiveDeployments() {
122-
aws deploy list-deployments \
122+
if ! aws deploy list-deployments \
123123
--application-name "$INPUT_CODEDEPLOY_NAME" \
124124
--deployment-group-name "$INPUT_CODEDEPLOY_GROUP" \
125-
--include-only-statuses "Queued" "InProgress" | jq -r '.deployments';
125+
--include-only-statuses "Queued" "InProgress" | jq -r '.deployments'; then
126+
echo -e "${ORANGE}Deployment may still be executing."
127+
echo -e "${RED}Failed monitoring deployment (ListDeployments API call failed)."
128+
exit 1;
129+
fi
126130
}
127131

128132
function getSpecificDeployment() {

0 commit comments

Comments
 (0)