Last active
April 21, 2019 12:08
-
-
Save josdem/ed25771ff9a50eff445e42acdcf17f8a 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
#!/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() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gradle -b health.gradle check