Skip to content

Instantly share code, notes, and snippets.

@unbelauscht
Last active July 15, 2021 11:48
Show Gist options
  • Save unbelauscht/b9ad3ec1dd215fdab067d1ca706a8ecb to your computer and use it in GitHub Desktop.
Save unbelauscht/b9ad3ec1dd215fdab067d1ca706a8ecb to your computer and use it in GitHub Desktop.
Wait for ECS deployment
#!/bin/bash
count=0
while `aws ecs describe-services --cluster ${CLUSTER_NAME} --services ${SERVICE_NAME} --region ${AWS_REGION} | \
jq -r '.services[].deployments[] | .status' | grep ACTIVE 2>&1 > /dev/null`
do
if ! (( count % 3 )); then
echo "$count: Waiting for deployment task to finish";
fi
let "count=count+1"
sleep 10;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment