mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 13:25:49 +00:00
added jenkins
This commit is contained in:
parent
d854ebf77c
commit
1c6a85f448
1 changed files with 24 additions and 0 deletions
24
Jenkinsfile
vendored
24
Jenkinsfile
vendored
|
@ -16,5 +16,29 @@ pipeline {
|
|||
sh "./mvnw test"
|
||||
}
|
||||
}
|
||||
|
||||
stage ("CodeScaning"){
|
||||
environment {
|
||||
SONAR_HOME = tool 'sonar-scan'
|
||||
}
|
||||
steps{
|
||||
withSonarQubeEnv('SonarServer') {
|
||||
sh '''$SCANNER_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}
|
||||
|
||||
'''
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue