Skip to content

Instantly share code, notes, and snippets.

@josdem
Last active April 21, 2019 12:08
Show Gist options
  • Save josdem/ed25771ff9a50eff445e42acdcf17f8a to your computer and use it in GitHub Desktop.
Save josdem/ed25771ff9a50eff445e42acdcf17f8a to your computer and use it in GitHub Desktop.
#!/usr/bin/env groovy
def request() {
println 'Starting health check'
try {
String response = "curl -H 'Content-Type: text/plain' https://webflux.josdem.io/sanity/ping".execute().text
assert response == 'pong'
println 'Up and running!'
} catch (AssertionError aex){
println 'Service is not ready yet'
}
}
task check {
request()
}
@josdem
Copy link
Author

josdem commented Apr 21, 2019

gradle -b health.gradle check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment