Skip to content

Instantly share code, notes, and snippets.

Created December 8, 2020 22:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jeffsheets/60effa1b85b7fcc1d084f214427a5975 to your computer and use it in GitHub Desktop.
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