Jenkins Pipeline Declarative CICD Flow

This commit is contained in:
Vishvendra Singh 2024-09-28 05:19:36 +01:00
parent a06cfdaf2b
commit 38873c5ab6

31
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,31 @@
// Jenkins Pipeline Declarative CICD Flow
pipeline {
agent any
stages {
stage("build") {
steps {
sh "./mvnw package"
}
}
stage("artifact") {
steps {
archiveArtifacts '**/target/*.jar'
jacoco()
junit '**/target/surefire-reports/TEST*.xml'
}
}
}
// post actions
post {
always {
emailext body: 'Test Message',
recipientProviders: [developers(), requestor()],
subject: 'Test Subject',
to: 'test@example.com'
}
}
}