File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ if [[ -z "$UsePropertiesFileFromProject" || $UsePropertiesFileFromProject == fal
44then
55 echo "sonar.projectKey=$SonarqubeProjectKey" > sonar-project.properties
66fi
7+ if [[ -z "$SonarContainerImage" ]]
8+ then
9+ SonarContainerImage="sonarsource/sonar-scanner-cli"
10+ fi
711docker run \\
812--rm \\
913-e SONAR_HOST_URL=$SonarqubeEndpoint \\
@@ -64,6 +68,11 @@ UPDATE plugin_pipeline_script SET script=E'#!/bin/sh
6468 # Define sonarqube scan function
6569 SonarqubeScanFunction() {
6670 echo -e "\n ********** Starting the scanning ************"
71+ if [[ -z "$SonarContainerImage" ]]
72+ then
73+ SonarContainerImage="sonarsource/sonar-scanner-cli"
74+ fi
75+
6776 docker run --rm -e SONAR_HOST_URL=$SonarqubeEndpoint -e SONAR_LOGIN=$SonarqubeApiKey -v "/$PWD:/usr/src" $SonarContainerImage
6877 SonarScanStatusCode=$?
6978 echo -e "\n Status code of sonarqube scanning command : $SonarScanStatusCode"
You can’t perform that action at this time.
0 commit comments