Added changes in Jenkinsfile

This commit is contained in:
Aseerwadham 2023-03-16 13:18:16 +05:30
parent 38b9ae7782
commit fefc1c53b0
2 changed files with 29 additions and 1 deletions

28
Jenkinsfile vendored
View file

@ -0,0 +1,28 @@
pipeline {
agent { label 'JDK_17' }
triggers { pollSCM ('* * * * *') }
}
stages {
stage('vcs') {
steps {
git url: 'https://github.com/Aseerwadham/spring-petclinic.git',
branch: 'main'
}
}
stage('package') {
tools {
jdk 'JDK_17'
}
steps {
sh "mvn package"
}
}
stage('post build') {
steps {
archiveArtifacts artifacts: '**/target/spring-petclinic-3.0.0-SNAPSHOT.jar',
onlyIfSuccessful: true
junit testResults: '**/surefire-reports/TEST-*.xml'
}
}
}
}

View file

@ -382,5 +382,5 @@
</build>
</profile>
</profiles>
</project>