Skip to content

Instantly share code, notes, and snippets.

@titenkov
Created June 30, 2020 18:18
Show Gist options
  • Save titenkov/944dc5f1551c1ff704f068a6bdaa9be4 to your computer and use it in GitHub Desktop.
Save titenkov/944dc5f1551c1ff704f068a6bdaa9be4 to your computer and use it in GitHub Desktop.
Gradle: wait for container to be up
task waitForAlfresco() {
description = 'Wait for Alfresco'
group = 'verification'
doFirst{
println "Waiting for Alfresco to come up"
ant.waitfor(
maxwait: '5', maxwaitunit: 'minute',
checkevery: '10', checkeveryunit: 'second'
) {
socket(server: 'localhost', port: 8080)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment