mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 14:55:50 +00:00
add jenkins file for sonar
This commit is contained in:
parent
bc0e14b033
commit
217bfcc297
1 changed files with 16 additions and 0 deletions
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
|
@ -1,10 +1,26 @@
|
|||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
SCANNER_HOME=tool 'sonar-scanner'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Stage 1') {
|
||||
steps {
|
||||
echo 'Hello world!'
|
||||
}
|
||||
}
|
||||
|
||||
stage("Sonarqube Analysis"){
|
||||
steps{
|
||||
withSonarQubeEnv('sonar-server') {
|
||||
sh ''' $SCANNER_HOME/bin/sonar-scanner -Dsonar.projectName=Petclinic \
|
||||
-Dsonar.java.binaries=. \
|
||||
-Dsonar.projectKey=Petclinic '''
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue