Can anyone hint me - what is wrong with this step? I need to check, that application is deployed and website is up^
stage('Check Availability') {
agent any
steps {
timeout(time: 15, unit: 'SECONDS') {
waitUntil {
try {
sh "curl -s --head --request GET localhost:8081/actuator/health | grep '200'"
return true
} catch (Exception e) {
return false
}
}
}
}
}
But I cannot understand what is wrong with groovy syntax. Right now I receive error.
WorkflowScript: 50: Expected a step @ line 50, column 15.
try {
^