Skip to content

Instantly share code, notes, and snippets.

@witokondoria
Created September 29, 2017 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save witokondoria/c87148e67af73243fa7d0238ec5a99d5 to your computer and use it in GitHub Desktop.
Save witokondoria/c87148e67af73243fa7d0238ec5a99d5 to your computer and use it in GitHub Desktop.
double try/catch
try {
sh "mvn test"
} catch (terr) {
throw new GroovyRuntimeException("Exception on tests", terr)
} finally {
archive "**/surefire-reports/*.xml"
try {
junit allowEmptyResults: true, keepLongStdio: true, testResults: "**/target/${crossbuild}/surefire-reports/*.xml"
} catch (juterr) {
mail X
} finally
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment