mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-14 08:02:22 +00:00
Split Branches Into Multiple Sonarqube Projects
Eliminate analysis collisions and simplify application of analysis quite periods. Fixes: gh-6091
This commit is contained in:
parent
e218ac2e40
commit
acdd9ba1db
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -30,7 +30,11 @@ try {
|
|||||||
checkout scm
|
checkout scm
|
||||||
withCredentials([string(credentialsId: 'spring-sonar.login', variable: 'SONAR_LOGIN')]) {
|
withCredentials([string(credentialsId: 'spring-sonar.login', variable: 'SONAR_LOGIN')]) {
|
||||||
try {
|
try {
|
||||||
sh "./gradlew sonarqube -PexcludeProjects='**/samples/**' -Dsonar.host.url=$SPRING_SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN --refresh-dependencies --no-daemon --stacktrace"
|
if ("master" == env.BRANCH_NAME) {
|
||||||
|
sh "./gradlew sonarqube -PexcludeProjects='**/samples/**' -Dsonar.host.url=$SPRING_SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN --refresh-dependencies --no-daemon --stacktrace"
|
||||||
|
} else {
|
||||||
|
sh "./gradlew sonarqube -PexcludeProjects='**/samples/**' -Dsonar.projectKey='spring-security-${env.BRANCH_NAME}' -Dsonar.projectName='spring-security-${env.BRANCH_NAME}' -Dsonar.host.url=$SPRING_SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN --refresh-dependencies --no-daemon --stacktrace"
|
||||||
|
}
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
currentBuild.result = 'FAILED: sonar'
|
currentBuild.result = 'FAILED: sonar'
|
||||||
throw e
|
throw e
|
||||||
|
Loading…
x
Reference in New Issue
Block a user