Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,14 @@ if [ -n "$INPUT_PREPARE_TASK_CONTAINER_IMAGE_CHANGES" ] && [ -n "$INPUT_PREPARE_
waitOnTask "$TASK_ARN"

TASK_RESPONSE=$(describeTask "$TASK_ARN")
EXIT_CODE=$(echo "$TASK_RESPONSE" | jq -r '.tasks[0]?.containers[0]?.exitCode // 255')
if echo "$TASK_RESPONSE" | jq -e '.tasks[0].containers[] | select((.exitCode // 255) != 0)' > /dev/null; then
EXIT_CODE=$(echo "$TASK_RESPONSE" | jq -r '.tasks[0].containers[] | select((.exitCode // 255) != 0) | .exitCode // 255')

if [ "$EXIT_CODE" -eq 0 ]; then
echo -e "${GREEN}Task has executed successfully.";
else
echo -e "${RED}Task returned non-zero exit code: ${RESET_TEXT}$EXIT_CODE. Raw response is below:";
echo -e "${TASK_RESPONSE}"
exit 1;
else
echo -e "${GREEN}Task has executed successfully.";
fi
fi

Expand Down