mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:55:49 +00:00
Create Jenkinsfile
This commit is contained in:
parent
56e00b3593
commit
c9d56a2a8c
1 changed files with 57 additions and 0 deletions
57
Jenkinsfile
vendored
Normal file
57
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
// delcarative
|
||||
|
||||
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
stages {
|
||||
|
||||
|
||||
}
|
||||
|
||||
stage("Build"){
|
||||
steps {
|
||||
sh "./mvnw package"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
stage ("capture") {
|
||||
steps {
|
||||
|
||||
archiveArtifacts '**/target/*.jar'
|
||||
jacoco()
|
||||
junit '**/target/surefire-reports/*.xml'
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
emailext(
|
||||
subject: "🟢 Build réussi pour ${env.JOB_NAME}",
|
||||
body: "Super nouvelle ! Le build ${env.BUILD_NUMBER} s'est bien déroulé. Voir les détails ici : ${env.BUILD_URL}",
|
||||
recipientProviders: [culprits(), developers()],
|
||||
to: 'test@teachmemore.fr'
|
||||
)
|
||||
}
|
||||
unstable {
|
||||
emailext(
|
||||
subject: "🟡 Attention : Build instable pour ${env.JOB_NAME}",
|
||||
body: "Il semble y avoir quelques problèmes avec le build ${env.BUILD_NUMBER}. Veuillez vérifier ici : ${env.BUILD_URL}",
|
||||
recipientProviders: [culprits(), developers()],
|
||||
to: 'test@teachmemore.fr'
|
||||
)
|
||||
}
|
||||
failure {
|
||||
emailext(
|
||||
subject: "🔴 Échec du build pour ${env.JOB_NAME}",
|
||||
body: "Malheureusement, le build ${env.BUILD_NUMBER} a échoué. Consultez les détails et les logs ici : ${env.BUILD_URL}",
|
||||
recipientProviders: [culprits(), developers()],
|
||||
to: 'test@teachmemore.fr'
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue