mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-19 05:55:51 +00:00
Adding a sample SonarQube configuration.
This commit is contained in:
parent
7852dc58b8
commit
0aea718e5e
1 changed files with 24 additions and 0 deletions
24
Jenkinsfile
vendored
24
Jenkinsfile
vendored
|
@ -16,6 +16,30 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('SonarQube analysis') {
|
||||||
|
withSonarQubeEnv('SonarQube Scanner 3.0.3.778') {
|
||||||
|
sh 'mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar ' +
|
||||||
|
'-f pom.xml ' +
|
||||||
|
'-Dsonar.projectKey=com.huettermann:all:master ' +
|
||||||
|
'-Dsonar.login=$SONAR_UN ' +
|
||||||
|
'-Dsonar.password=$SONAR_PW ' +
|
||||||
|
'-Dsonar.language=java ' +
|
||||||
|
'-Dsonar.sources=. ' +
|
||||||
|
'-Dsonar.tests=. ' +
|
||||||
|
'-Dsonar.test.inclusions=**/*Test*/** ' +
|
||||||
|
'-Dsonar.exclusions=**/*Test*/**'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage("SonarQube Quality Gate") {
|
||||||
|
timeout(time: 1, unit: 'HOURS') {
|
||||||
|
def qg = waitForQualityGate()
|
||||||
|
if (qg.status != 'OK') {
|
||||||
|
error "Pipeline aborted due to quality gate failure: ${qg.status}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('Approve for QA') {
|
stage('Approve for QA') {
|
||||||
agent any
|
agent any
|
||||||
steps {
|
steps {
|
||||||
|
|
Loading…
Reference in a new issue