Skip to content

Commit

Permalink
updating simple maven project
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosrodlop authored Feb 3, 2022
1 parent 2e848fd commit 6a4ff14
Showing 1 changed file with 12 additions and 25 deletions.
37 changes: 12 additions & 25 deletions templates/simple-java-maven-app/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
pipeline {
agent any

agent {
kubernetes {
label 'maven'
defaultContainer 'maven'
}
}

stages {
stage('Checkout') {
Expand All @@ -15,28 +21,9 @@ pipeline {
}

post {

// Email Ext plugin:
success {

emailext (
subject: "SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
body: """<p>SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p>
<p>Check console output at &QUOT;<a href='${env.BUILD_URL}'>${env.JOB_NAME} [${env.BUILD_NUMBER}]</a>&QUOT;</p>""",
to: "${emailRecipient}",
from: "[email protected]"
)
}

failure {

emailext (
subject: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
body: """<p>FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p>
<p>Check console output at &QUOT;<a href='${env.BUILD_URL}'>${env.JOB_NAME} [${env.BUILD_NUMBER}]</a>&QUOT;</p>""",
to: "${emailRecipient}",
from: "[email protected]"
)
}
success {
junit 'target/surefire-reports/**/*.xml'
}
}
}
}
}

0 comments on commit 6a4ff14

Please sign in to comment.