From 3d80e984ee9b1ff56435811639cd89ba8254c808 Mon Sep 17 00:00:00 2001 From: khaled Date: Wed, 30 Sep 2026 14:43:37 +0000 Subject: [PATCH] Update vars/sonarScan.groovy --- vars/sonarScan.groovy | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vars/sonarScan.groovy b/vars/sonarScan.groovy index ad329c1..b03d6c1 100644 --- a/vars/sonarScan.groovy +++ b/vars/sonarScan.groovy @@ -2,16 +2,16 @@ // Run a SonarQube analysis from the scanner container. // Usage: sonarScan('my-project-key') def call(String projectKey, Map config = [:]) { - def host = config.host ?: 'http://10.0.1.4:9000' + def host = config.host ?: 'http://10.0.1.4:9000' def sources = config.sources ?: '.' container('scanner') { stage('SonarQube analysis') { withCredentials([string(credentialsId: 'sonarqube-token', variable: 'SONAR_TOKEN')]) { sh """ - sonar-scanner \ - -Dsonar.host.url=${host} \ - -Dsonar.projectKey=${projectKey} \ - -Dsonar.sources=${sources} \ + sonar-scanner \\ + -Dsonar.host.url=${host} \\ + -Dsonar.projectKey=${projectKey} \\ + -Dsonar.sources=${sources} \\ -Dsonar.token=\${SONAR_TOKEN} """ }