mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 23:35:50 +00:00
Jenkinsfile_DP2
This commit is contained in:
parent
84aa0e24b1
commit
997a09b109
2 changed files with 51 additions and 16 deletions
24
Jenkinsfile
vendored
24
Jenkinsfile
vendored
|
@ -1,20 +1,12 @@
|
|||
// node {
|
||||
// stage('sourcecode'){
|
||||
// //build step
|
||||
// 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{
|
||||
pipeline {
|
||||
agent any
|
||||
options {
|
||||
timeout(time: 1, unit: 'HOURS')
|
||||
retry(2)
|
||||
}
|
||||
triggers {
|
||||
cron('* * * * *')
|
||||
}
|
||||
|
||||
stages {
|
||||
stage ('SourceCode') {
|
||||
|
|
43
scripted_jf_backup
Normal file
43
scripted_jf_backup
Normal file
|
@ -0,0 +1,43 @@
|
|||
// node {
|
||||
// stage('sourcecode'){
|
||||
// //build step
|
||||
// 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{
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage ('SourceCode') {
|
||||
steps {
|
||||
//source code from github
|
||||
git branch: 'main', url: 'https://github.com/vishnu1411/spring-petclinic.git'
|
||||
}
|
||||
|
||||
}
|
||||
stage ('Build and install') {
|
||||
steps {
|
||||
//clean and build using maven
|
||||
sh 'mvn clean install'
|
||||
}
|
||||
|
||||
}
|
||||
stage ('Archive test results') {
|
||||
steps {
|
||||
//Archive the test results
|
||||
junit '**/surefire-reports/*xml'
|
||||
archiveArtifacts artifacts: '**/*.jar', followSymlinks: false
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue