Jenkinsfile_DP

This commit is contained in:
vishnu1411 2023-12-16 11:23:25 -05:00
parent 24dbc1fe80
commit 463eb5e655

52
Jenkinsfile vendored
View file

@ -1,15 +1,43 @@
node { // node {
stage('sourcecode'){ // stage('sourcecode'){
//build step // //build step
git branch: 'main', url: 'https://github.com/vishnu1411/spring-petclinic.git' // git branch: 'main', url: 'https://github.com/vishnu1411/spring-petclinic.git'
// }
// stage('Build and install'){
// //building using maven and install
// sh 'mvn clean install'
// }
// stage('Archive test results'){
// //insteall & archive test reuslts
// junit '**/surefire-reports/*xml'
// archiveArtifacts artifacts: '**/*.jar', followSymlinks: false
// }
// }
pipeline{
agents any
stages {
stage ('SourceCode') {
steps {
//source code from github
git branch: 'main', url: 'https://github.com/vishnu1411/spring-petclinic.git'
}
} }
stage('Build and install'){ stage ('Build and install') {
//building using maven and install steps {
sh 'mvn clean install' //clean and build using maven
sh 'mvn clean install'
}
} }
stage('Archive test results'){ stage ('Archive test results') {
//insteall & archive test reuslts steps {
junit '**/surefire-reports/*xml' //Archive the test results
archiveArtifacts artifacts: '**/*.jar', followSymlinks: false junit '**/surefire-reports/*xml'
archiveArtifacts artifacts: '**/*.jar', followSymlinks: false
}
} }
} }
}