Need help : Error during build SonarQube with Jenkins

sonarqube
(Bharath Kumar) #1
  • versions used (SonarQube : latest docker image, Scanner plugin for jenkins 2.8.1)
  • error observed -
Started by user Jenkins Admin
Building in workspace /var/jenkins_home/workspace/Sonar_Demo
No credentials specified
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/Demo/SCA.git # timeout=10
Fetching upstream changes from https://github.com/Demo/SCA.git
 > git --version # timeout=10
 > git fetch --tags --progress https://github.com/Demo/SCA.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision d6e7d9beb67239cac2fe5ac6a4d94c2bd8add5ca (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f d6e7d9beb67239cac2fe5ac6a4d94c2bd8add5ca
Commit message: "Simple customer app parent directory deleted"
First time build. Skipping changelog.
[Sonar_Demo] $ /opt/sonar_scanner/src/main/assembly/bin/sonar-scanner -Dsonar.host.url=http://X.X.X.X:9000/sonar ******** -Dsonar.projectName=Demo -Dsonar.projectVersion=1.0 -Dsonar.projectKey=Demo -Dsonar.sources=/var/lib/jenkins/workspace/Sonar_Demo/SCA/src -Dsonar.projectBaseDir=/var/jenkins_home/workspace/Sonar_Demo
/opt/sonar_scanner/src/main/assembly/bin/sonar-scanner: 31: /opt/sonar_scanner/src/main/assembly/bin/sonar-scanner: Bad substitution
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?
ERROR: SonarQube scanner exited with non-zero code: 2
Finished: FAILURE