Sonar Analysis using Jenkins can't find executable

Tyler Plude picture Tyler Plude · Oct 21, 2013 · Viewed 8.8k times · Source

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.

Answer

falko picture falko · May 21, 2015

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.