Created
May 8, 2018 00:21
-
-
Save dejanvasic85/75965d6854597fcbc25dcbcf6742b5e5 to your computer and use it in GitHub Desktop.
Bash retry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| cluster="cluster-name" | |
| x="aws ecs wait services-stable --cluster $cluster --services $cluster" | |
| echo "Waiting until ecs services report as healthy" | |
| for i in 1 2 3 4 5; do (eval $x) && break || sleep 5; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment