Problem
You have setup a job in TeamCity that runs an http request using curl. The job shows green but you’re not seeing the data or expected outcome. In the logs it says “Could not resolve host”. That’s obviously a separate issue, but a disappointing issue is that despite this failure the job reports green as though it succeeded.

Solution
I had to add the following
The key is that ping will set the exit status code to 2 rather than 0. This will fail the build in TeamCity and make it obvious that there is in fact an issue.