Skip to content

Instantly share code, notes, and snippets.

@tomoconnor
Created November 12, 2012 18:27
Show Gist options
  • Select an option

  • Save tomoconnor/4060996 to your computer and use it in GitHub Desktop.

Select an option

Save tomoconnor/4060996 to your computer and use it in GitHub Desktop.
Simple way to check a site's availability from jenkins jobs
URL="http://tomoconnor.eu"
HTTP_STATUS=$(curl -o /dev/null -s -if --write-out "%{http_code}\n" $URL)
if [ $HTTP_STATUS -ne 200 ]; then `which false`; else `which true`; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment