Sonarqube scanner failing with "syntax error at line 16: `target=$' unexpected"


(Jason Stanley) #1

SonarQube 6.7.2
SonnarQube scanner for Jenkins plugin - 2.8.1

I have a Jenkins job that is failing when executing the SonarQube Scanner build step.

Console output below:

Any ideas why?

[Core-SonarQube] $ /home/build/tools/hudson.plugins.sonar.SonarRunnerInstallation/IL_Sonarqube/bin/sonar-scanner -Dsonar.host.url=http://sonarqube-dev.xxxxxx.com -Dsonar.projectName=Cix_Core -Dsonar.projectVersion=5.11 -Dsonar.projectKey=com.cix:core:5.7 -Dsonar.java.binaries=classes -Dsonar.sources=. -Dsonar.projectBaseDir=/home/build/workspace/SonarQube/Core-SonarQube
/home/build/tools/hudson.plugins.sonar.SonarRunnerInstallation/IL_Sonarqube/bin/sonar-scanner: syntax error at line 16: `target=$' unexpected

(G Ann Campbell) #2

Hi,

There’s nothing obvious in the analysis command line you supplied to explain the error your’e getting. Could you share a little more detail about how analysis is configured in your Jenkins job?

 
Ann


(Jason Stanley) #3

I was able to resolve the issue by running the scan on a different Jenkins agent.