jenkins: only update sonarqube when on develop branch
This commit is contained in:
parent
3b9e9f7e34
commit
b11c21571f
1 changed files with 8 additions and 3 deletions
|
@ -32,9 +32,14 @@ pipeline {
|
||||||
sh "${mvn} checkstyle:checkstyle"
|
sh "${mvn} checkstyle:checkstyle"
|
||||||
sh "${mvn} pmd:pmd"
|
sh "${mvn} pmd:pmd"
|
||||||
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
|
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
|
||||||
withSonarQubeEnv('sonarqube') {
|
}
|
||||||
sh "${mvn} org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar"
|
}
|
||||||
}
|
}
|
||||||
|
stage('SonarQube (develop only)') {
|
||||||
|
when { expression { env.GIT_BRANCH == 'develop' } }
|
||||||
|
steps {
|
||||||
|
withSonarQubeEnv('sonarqube') {
|
||||||
|
sh "${mvn} org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue