Created
February 16, 2021 05:42
-
-
Save ryanvgates/c8a5ce48b7e1527e6018fae080491691 to your computer and use it in GitHub Desktop.
Fail TeamCity on not resolve host
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
set -x | |
set -e | |
ping -c 4 %host.name% | |
curl -H "Accept: application/json" -H \ | |
http://%host.name%/GetStatus \ | |
| jq . | tee status.txt | |
res=$? | |
if test "$res" != "0"; then | |
echo "the curl command failed with: $res" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment