added in diclarative way

This commit is contained in:
shaif ali khan 2023-07-29 12:39:28 +05:30
parent 0a529015bc
commit 1f71b59f03

37
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,37 @@
pipeline {
agent any
options {
timeout(time: 30, unit: 'MINUTES')
}
triggers {
pollSCM(* * * * *)
}
tools {
jdk 'JDK_17'
}
stages {
stage('vcs') {
steps {
git url: 'https://github.com/shaifalikhan5/spring-petclinic.git',
branch: 'develop'
}
}
stage('build and packaging') {
steps {
sh script: 'mvn package'
}
}
stage('reporting') {
steps {
archiveArtifacts artifacts : '**/target/sprigpetclinic-*.jar'
junit testResults : '**/surefire-reports/**.xml'
}
}
}
}