mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-24 00:35:49 +00:00
added
This commit is contained in:
parent
8b5bbc5aa4
commit
ec032c46db
2 changed files with 44 additions and 31 deletions
44
jenkins.file
Normal file
44
jenkins.file
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
pipeline {
|
||||||
|
agent {'label JDK_8'}
|
||||||
|
options {
|
||||||
|
retry(3)
|
||||||
|
timeout(time: 30, unit: 'MINUTES')
|
||||||
|
}
|
||||||
|
triggers {
|
||||||
|
corn(* * * * * )
|
||||||
|
}
|
||||||
|
tools {
|
||||||
|
jdk 'JAVA_8'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('code') {
|
||||||
|
steps {
|
||||||
|
git url: 'https://github.com/KVKR31/dummy.git' ,
|
||||||
|
branch : 'master'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('package') {
|
||||||
|
steps {
|
||||||
|
sh script: ' mvn clean package'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('build') {
|
||||||
|
steps {
|
||||||
|
junit testResults: '**/surefire-reports/TEST-*.xml'
|
||||||
|
archiveArtifacts artifacts: '**/target/gameoflife.war'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pool {
|
||||||
|
success {
|
||||||
|
mail subject: 'your project is effective'
|
||||||
|
body: 'your project is effective'
|
||||||
|
to: 'vinod@gmail.com'
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
mail subject: 'your project is failure'
|
||||||
|
body: 'your project is defective'
|
||||||
|
to: 'vinod@gmail.com'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
31
jenkinsfile
31
jenkinsfile
|
@ -1,31 +0,0 @@
|
||||||
pipeline {
|
|
||||||
stage { label JDK-17}
|
|
||||||
options {
|
|
||||||
timeout(time: 30, unit: 'MINUTES')
|
|
||||||
}
|
|
||||||
triggers {
|
|
||||||
pollscm ('* * * * *')
|
|
||||||
}
|
|
||||||
tools {
|
|
||||||
'JDK-17'
|
|
||||||
}
|
|
||||||
stages {
|
|
||||||
stage('vcs') {
|
|
||||||
steps {
|
|
||||||
git url: 'https://github.com/KVKR31/dummy.git',
|
|
||||||
branch: 'main'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('build and package') {
|
|
||||||
steps {
|
|
||||||
sh script: 'mvn package'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('reportind') {
|
|
||||||
steps {
|
|
||||||
archiveArtifacts artifacts: '**/target/springpetclinic-*.jar'
|
|
||||||
junit testResults: '**/target/surefire-reports/TEST-*.xml'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue