9

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.

Tyler Plude
  • 235
  • 4
  • 9

3 Answers3

3

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.

falko
  • 31
  • 2
1

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.

Electrawn
  • 2,254
  • 18
  • 24
1

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

Eddú Meléndez
  • 6,107
  • 1
  • 26
  • 35