mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:55:49 +00:00
Jenkinsfile_DP
This commit is contained in:
parent
24dbc1fe80
commit
463eb5e655
1 changed files with 40 additions and 12 deletions
52
Jenkinsfile
vendored
52
Jenkinsfile
vendored
|
@ -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
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue