added jenkinsfile

This commit is contained in:
nagasuribabukola 2023-10-03 21:18:52 +05:30
parent 923e2b7aa3
commit c74312bda1

27
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,27 @@
pipeline {
agent any
triggers { pollSCM(* * * * *)}
stages {
stage('VCS'){
steps {
git url: 'https://github.com/dumyrepositories/spring-petclinic-multibranch.git',
branch: 'main'
}
}
stage('Build'){
steps {
sh 'mvn package'
}
}
stage('Post Build') {
steps {
archiveArtifacts artifacts: '**/target/*.jar',
onlyIfSuccessful: true
junit testResults: '**/surefire-reports/TEST-*.xml',
allowEmptyResults: false
}
}
}
}