mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-19 14:25:50 +00:00
Jekins added
This commit is contained in:
parent
579c32fac8
commit
164549ae03
1 changed files with 5 additions and 42 deletions
39
Jenkinsfile
vendored
39
Jenkinsfile
vendored
|
@ -6,47 +6,10 @@ pipeline {
|
|||
|
||||
stage ("Build") {
|
||||
steps {
|
||||
sh "./mvnw install"
|
||||
sh"./mvwn install"
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Run unit-test"){
|
||||
|
||||
steps {
|
||||
sh "./mvnw test"
|
||||
}
|
||||
}
|
||||
|
||||
stage ("CodeScaning"){
|
||||
environment {
|
||||
SONAR_HOME = tool 'sonar-scan'
|
||||
}
|
||||
steps{
|
||||
withSonarQubeEnv('SonarServer') {
|
||||
sh '''$SONAR_HOME/bin/sonar-scanner \
|
||||
-Dsonar.projectKey=myPETC \
|
||||
-Dsonar.projectName=mypetclinc \
|
||||
-Dsonar.sources=. \
|
||||
-Dsonar.java.binaries=target/classes \
|
||||
-Dsonar.exclusions=src/test/java/****/*.java \
|
||||
-Dsonar.analysis.mode=publish \
|
||||
-Dsonar.projectVersion=${BUILD_NUMBER}-${GIT_COMMIT_SHORT}
|
||||
|
||||
'''
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
stage('Quality Gate') {
|
||||
steps {
|
||||
timeout(time: 5, unit: 'MINUTES') {
|
||||
waitForQualityGate abortPipeline: true
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue