File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -169,12 +169,22 @@ aws ecs update-service \
169169
170170# # Now we wait till it's stable
171171echo " --- :ecs: Waiting for services to stabilize"
172+ deploy_exitcode=0
172173aws ecs wait services-stable \
173174 --cluster " ${cluster} " \
174- --services " ${service_name} "
175+ --services " ${service_name} " || deploy_exitcode= $?
175176
176- aws ecs describe-services \
177- --cluster " ${cluster} " \
178- --service " ${service_name} "
179177
180- echo " +++ :ecs: Service is up π"
178+ service_events=$( aws ecs describe-services \
179+ --cluster " ${cluster} " \
180+ --service " ${service_name} " \
181+ --query ' services[].events' --output text)
182+
183+ if [[ $deploy_exitcode -eq 0 ]]; then
184+ echo " --- :ecs: Service is up π"
185+ echo " $service_events "
186+ else
187+ echo " +++ :ecs: Service failed to deploy β"
188+ echo " $service_events "
189+ exit $deploy_exitcode
190+ fi
You canβt perform that action at this time.
0 commit comments