SonarQube Plugin for Jenkins does not find SonarQube Scanner executable

oyvindym picture oyvindym · Sep 12, 2016 · Viewed 16.3k times · Source

I am trying to run the SonarQube Scanner within Jenkins as a post-build step. However, I keep getting the error message below:

------------------------------------------------------------------------
SONAR ANALYSIS FAILED
------------------------------------------------------------------------
FATAL: SonarQube Scanner executable was not found for SonarQube
Build step 'Execute SonarQube Scanner' marked build as failure

From similar questions on stackoverflow I read that one should choose "Install automatically" for the SonarQube Scanner, which I have done.

My configurations is as follows:

  • SonarQube 6.0
  • Jenkins 1.609.3
  • SonarQube Plugin 2.4.4

SonarQube Servers

sonarqubeservers.png

SonarQube Scanner

sonarqubescanner.png

Build-step

buildstep.png

Answer

Harsha Biyani picture Harsha Biyani · Sep 15, 2017

Make sure you are giving path in Global Tool Configuration correctly. Give the path of folder in which bin folder is exists inside that folder.

Step1 : 1st find where the sonar_scanner bin is available -

root@test1sp117:/opt/sonar_scanner/sonar-scanner-3.0.3.778-linux# ls
bin  conf  jre  lib

Step2 : Give the correct path in Manage Jenkins --> Global Tool Configuration --> SonarQube Scanner

enter image description here