Skip to content

Instantly share code, notes, and snippets.

@wololock
Created May 29, 2020 10:55
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 wololock/c820673a15f251a2f3db426f79273619 to your computer and use it in GitHub Desktop.
Save wololock/c820673a15f251a2f3db426f79273619 to your computer and use it in GitHub Desktop.
stage("Build") {
steps {
sh "mvn clean install"
}
post {
always {
script {
try {
junit "**/target/surefire-reports/TEST-*.xml,**/target/failsafe-reports/*.xml"
} catch (e) {
echo "WARNING: couldn't publish junit test reports"
}
try {
jacoco execPattern: 'target/*.exec', classPattern: 'target/classes', sourcePattern: 'src/main/java', exclusionPattern: 'src/test*'
} catch(e) {
echo "WARNING: couldn't publish jacoco test coverage"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment