This repository was archived by the owner on May 31, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,15 @@ try {
3333 node {
3434 checkout scm
3535 withCredentials([string(credentialsId : ' spring-sonar.login' , variable : ' SONAR_LOGIN' )]) {
36- try {
37- withEnv([" JAVA_HOME=${ tool 'jdk8' } " ]) {
38- sh " ./gradlew clean sonarqube -PexcludeProjects='**/samples/**' -Dsonar.host.url=$SPRING_SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN --refresh-dependencies --no-daemon"
36+ withCredentials([usernamePassword(credentialsId : ' 02bd1690-b54f-4c9f-819d-a77cb7a9822c' , usernameVariable : ' ARTIFACTORY_USERNAME' , passwordVariable : ' ARTIFACTORY_PASSWORD' )]) {
37+ try {
38+ withEnv([" JAVA_HOME=${ tool 'jdk8' } " ]) {
39+ sh " ./gradlew clean sonarqube -PexcludeProjects='**/samples/**' -Dsonar.host.url=$SPRING_SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --refresh-dependencies --no-daemon"
40+ }
41+ } catch (Exception e) {
42+ currentBuild. result = ' FAILED: sonar'
43+ throw e
3944 }
40- } catch (Exception e) {
41- currentBuild. result = ' FAILED: sonar'
42- throw e
4345 }
4446 }
4547 }
You can’t perform that action at this time.
0 commit comments