Skip to content

Instantly share code, notes, and snippets.

Created December 8, 2020 22:31
What would you like to do?
Minimal Gradle Jenkinsfile
//Inspired by
pipeline {
agent any
triggers {
//Needed by Bitbucket to see the builds on PRs
stages {
stage('test') {
steps {
script {
sh './gradlew clean check --stacktrace'
junit '**/build/test-results/test/*.xml'
post {
always { //Send an email to the person that broke the build
step([$class : 'Mailer',
notifyEveryUnstableBuild: true,
recipients : [emailextrecipients([[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']])].join(' '),
sendToIndividuals: true])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment