mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-18 05:25:50 +00:00
Create Jenkinsfile
This commit is contained in:
parent
ffa967c94b
commit
c1245047d8
1 changed files with 39 additions and 0 deletions
39
Jenkinsfile
vendored
Normal file
39
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
node {
|
||||
def mvnHome
|
||||
mvnHome = tool 'MVN 3.3'
|
||||
env.JAVA_HOME = tool 'Java 8'
|
||||
|
||||
stage('Preparation') { // for display purposes
|
||||
git 'https://github.com/spring-projects/spring-petclinic.git'
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
sh "'${mvnHome}/bin/mvn' install -Dmaven.test.skip=true"
|
||||
}
|
||||
|
||||
stage('Test') {
|
||||
parallel (
|
||||
"test": {
|
||||
sh "'${mvnHome}/bin/mvn' test"},
|
||||
"analysis": {
|
||||
sh "'${mvnHome}/bin/mvn' findbugs:findbugs"
|
||||
sh "'${mvnHome}/bin/mvn' checkstyle:checkstyle"
|
||||
sh "'${mvnHome}/bin/mvn' pmd:pmd"},
|
||||
"docu": {
|
||||
sh "'${mvnHome}/bin/mvn' javadoc:javadoc -Dmaven.javadoc.failOnError=false"}
|
||||
)
|
||||
}
|
||||
|
||||
stage('Report') {
|
||||
junit '**/target/surefire-reports/TEST-*.xml'
|
||||
step([$class: 'FindBugsPublisher', pattern: '**/findbugsXml.xml', unstableTotalAll:'0'])
|
||||
step([$class: 'hudson.plugins.checkstyle.CheckStylePublisher', pattern: '**/target/checkstyle-result.xml', unstableTotalAll:'0'])
|
||||
step([$class: 'PmdPublisher', pattern: '**/target/pmd.xml', unstableTotalAll:'0'])
|
||||
archive 'target/*.jar'
|
||||
}
|
||||
|
||||
stage('Deploy') {
|
||||
sleep 10
|
||||
echo "PerClinic deployed"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue