diff --git a/bin/deploy-release b/bin/deploy-release index 142e9075..9fcb517b 100755 --- a/bin/deploy-release +++ b/bin/deploy-release @@ -25,6 +25,12 @@ echo "::endgroup::" cluster_name=$(terraform -chdir="infra/$app_name/service" output -raw service_cluster_name) service_name=$(terraform -chdir="infra/$app_name/service" output -raw service_name) echo "Wait for service $service_name to become stable" -aws ecs wait services-stable --cluster "$cluster_name" --services "$service_name" +wait_for_service_stability() { + aws ecs wait services-stable --cluster "${cluster_name}" --services "${service_name}" +} +if ! wait_for_service_stability; then + echo "Retrying" + wait_for_service_stability +fi echo "Completed $app_name deploy of $image_tag to $environment"