added daybuild for jenkins in declarative pipeline

This commit is contained in:
thanusha 2023-08-04 15:22:46 +05:30
parent 3be289517d
commit b4e06f4e8b

32
jenkinsfile Normal file
View file

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