Created
May 30, 2019 15:26
-
-
Save lupupaulsv/d1cff1e892eec0c2aab4dfcde2f9e463 to your computer and use it in GitHub Desktop.
This file contains 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
for i in $ids; | |
do | |
echo "Waiting for build ID $i" | |
echo "Debug information at https://us-west-2.console.aws.amazon.com/systems-manager/automation/execution/$i?region=us-west-2" | |
while true; | |
do | |
status=$(aws ssm get-automation-execution --automation-execution-id "$i") | |
if [[ $(echo "$status" | grep -i "status" | grep -i "failed") ]]; then | |
echo 'Build failed!' | |
exit 1 | |
fi | |
if [[ $(echo "$status" | grep -i "imagestate" | grep -i "available") ]]; then | |
break | |
fi | |
echo -n "." | |
sleep 5 | |
done | |
done | |
echo 'Build succeeded!' |
This file contains 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
INSTANCESTATES shutting-down' | |
+ [[ -n IMAGESTATE available ]] | |
+ break | |
+ echo 'Build succeeded!' | |
Build succeeded! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ids=()
ids+=("$scheduler")
ids+=("$web")
ids+=("$admin")