Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sonar Analysis using Jenkins can't find executable

I'm trying to trigger a sonar analysis of an android application through Jenkins and the Sonar Runner plugin. I've added a "Invoke Standalone Sonar Analysis" build step to my job that builds the code using Ant. When it gets to the Sonar Analysis step it fails and outputs the following:

------------------------------------------------------------------------
SONAR ANALYSIS FAILED
------------------------------------------------------------------------
FATAL: Sonar runner executable was not found for Sonar Runner 2.2.2
Build step 'Invoke Standalone Sonar Analysis' marked build as failure

The jenkins agent is a remote linux server where I have installed the sonar-runner in /opt/ and have updated appropriate SONAR_RUNNER_HOME and PATH variables.

Have I installed the runner correctly? I've looked at the documentation and other similar installation related questions but have not found what my problem could be.

like image 306
Tyler Plude Avatar asked Oct 21 '13 21:10

Tyler Plude


3 Answers

Make sure to set the path of the runner correctly in Jenkins. It's the path without */bin in the end. That's a little tricky.

like image 144
falko Avatar answered Nov 17 '22 13:11

falko


In the Manage Jenkins section, Configure... did you set the Sonar Runner Installations correctly? Check box Install automatically and install automatically the version from Codehaus.

like image 29
Electrawn Avatar answered Nov 17 '22 13:11

Electrawn


Install Sonar Runner in the same server where Jenkins has been installed.

like image 1
Eddú Meléndez Avatar answered Nov 17 '22 13:11

Eddú Meléndez