1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-02-21 19:48:53 +02:00

fix(sonar): allign groovy part of Sonar step with common piperExecuteBin (#5157)

* add some logging to Vault login

* allign groovy part of the sonar step

* Revert "add some logging to Vault login"

This reverts commit d1738c124d2c1fbfb5becaad2a28dafcef4574fc.
This commit is contained in:
Googlom 2024-10-24 12:47:32 +05:00 committed by GitHub
parent 7b7ba77436
commit 4990b2d0ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,17 +65,19 @@ void call(Map parameters = [:]) {
writePipelineEnv(script: script, piperGoPath: piperGoPath)
withEnv(environment) {
influxWrapper(script) {
piperExecuteBin.credentialWrapper(config, credentialInfo) {
if (stepConfig.instance) {
withSonarQubeEnv(stepConfig.instance) {
echo "Instance is deprecated - please use serverUrl parameter to set URL to the Sonar backend."
try {
piperExecuteBin.credentialWrapper(config, credentialInfo) {
if (stepConfig.instance) {
withSonarQubeEnv(stepConfig.instance) {
echo "Instance is deprecated - please use serverUrl parameter to set URL to the Sonar backend."
sh "${piperGoPath} ${STEP_NAME}${customDefaultConfig}${customConfigArg}"
}
} else {
sh "${piperGoPath} ${STEP_NAME}${customDefaultConfig}${customConfigArg}"
jenkinsUtils.handleStepResults(STEP_NAME, false, false)
readPipelineEnv(script: script, piperGoPath: piperGoPath)
}
} else {
sh "${piperGoPath} ${STEP_NAME}${customDefaultConfig}${customConfigArg}"
}
} finally {
jenkinsUtils.handleStepResults(STEP_NAME, false, false)
}
}
}