[NO-JIRA] Jenkinsfile sonar credentials fix

This commit is contained in:
Matt Pavlovich 2024-10-01 11:07:37 -05:00 committed by Matt Pavlovich
parent 7a86e85f3d
commit 6a1a79c658
1 changed files with 4 additions and 3 deletions

7
Jenkinsfile vendored
View File

@ -162,9 +162,10 @@ pipeline {
when { expression { return params.sonarEnabled } }
steps {
withCredentials([string(credentialsId: 'SONARCLOUD_TOKEN', variable: 'SONAR_TOKEN')])
sh 'echo "Running the Sonar stage"'
sh 'mvn -B -e -fae clean verify sonar:sonar -Dsonar.projectKey=apache_activemq -Dsonar.organization=apache -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${SONAR_TOKEN} -Dsurefire.rerunFailingTestsCount=3'
withCredentials([string(credentialsId: 'SONARCLOUD_TOKEN', variable: 'SONAR_TOKEN')]) {
sh 'echo "Running the Sonar stage"'
sh 'mvn -B -e -fae clean verify sonar:sonar -Dsonar.projectKey=apache_activemq -Dsonar.organization=apache -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${SONAR_TOKEN} -Dsurefire.rerunFailingTestsCount=3'
}
}
}