Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to provide Sonar Runner home path to sonar4bamboo

N January 19, 2015

I installed sonar 4 bamboo on my Bamboo instance (v 5.5.1) and configured Sonar server settings from the administration pane.

I created a SonarQube Runner task in my plan which required to create a new Executable capability in order to define sonar runner home (I specified a path on the network that can be reached by all bamboo agents).

Unfortunately, my plan is failing because sonar runner can not be found by the plugin. The problem is that it seems the path provided in the capability is not taken into account : 

Unable to find executable at C:\Users\xxxxx\bamboo-agent-home\bin\bin\sonar-runner.bat. Will try to run it anyway.
The system cannot find the path specified.

I tried to use a local path instead of network one but it doesn't work any better.

Is there anything i'm doing wrong ?

5 answers

0 votes
Deleted user January 20, 2016

As an administrator, you could define a new executable under ‘Overview —> Server capabilities —> Add capability’...

 Capability type: Executable

 Type: Sonar Runner Home

 Executable label: sonarrunner

 Path: <FILESYSTEM_PATH_WHERE_SONAR_RUNNER_HAS_BEEN_INSTALLED_WITHOUT_BIN_SUBDIRECTORY>

0 votes
Mibex_Software
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2015

Hi,

Just wanted to keep you up-to-date about the progress on this. We plan to auto-discover SonarRunner installations based on the SONAR_RUNNER_HOME environment variable in the future. This would make a manual definition of the path obsolete. You can track the progress of this here: https://mibexsoftware.atlassian.net/browse/SONARBOO-4.

Concerning your issue with SonarRunner on Windows: Would you mind to create a bug report at https://mibexsoftware.atlassian.net/browse/SONARBOO. I think it is better when we discuss this issue there instead on this thread.

Thanks for bringing this up.

Michael from Mibex Software

N February 4, 2015

Thanks for your followup. I just created the bug in your backlog : https://mibexsoftware.atlassian.net/browse/SONARBOO-5 Regards, Nicolas

0 votes
Mibex_Software
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2015

Hi Nicolas,

I'm the author of the Sonar for Bamboo add-on. Actually I can only think of a Windows issue here. I've just created a new SonarRunner based Bamboo build by defining the home of the SonarRunner directory in the capabilities section (/opt/sonar/sonar-runner-2.4 in my example).

I'll try to setup a Bamboo instance on Windows to reproduce this and reply to this thread as soon as I have a solution.

Regards,

Michael

rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 20, 2015

Hello Michael, Pleasure talking to you. I am looking forward to hearing from you. — Kind regards, Rafael P. Sperafico Atlassian Support

0 votes
N January 20, 2015

Hello Rafael and thanks for your answer.

Actually, I never provided a path like this to sonar 4 bamboo.

I tried a network path (like "\\my_server\my_shared_folder\folder\[...]\SonarRunner2.4\") and a local path (like "d:\SonarRunner2.4\"). Actually, whatever path I specify, I always get the same error about path "C:\Users\xxxxx\bamboo-agent-home\bin\bin\sonar-runner.bat" which makes me think that the path I provide is not taken into account at all.

What do you think ?

 

Regards,

 Nicolas

rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 20, 2015

Hello Nicolas, * could you please inform what is the correct location to "sonar-runner.bat", please? * could you please add an Script task to your plan with the following: # on Windows, please uncomment the following line by removing the hash (#) #env # on Linux, please uncomment the following line by removing the hash (#) #set * could you please inform what is the Sonar add-on you have installed in Bamboo? Could you provide me with an screenshot displaying it in Manage Add-ons in Bamboo, please? The above will display all the environment variable available to Bamboo — Kind regards, Rafael P. Sperafico Atlassian Support

0 votes
rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 20, 2015

Hello Nicolas,

Thank you for your question.

Please, make sure you are specifying the correct location to Sonar executable.

C:\Users\xxxxx\bamboo-agent-home\bin\bin\...

Based on the path above, please notice there are two "bin" directories and, in my opinion, it is not intended to be like that. Please, notice this will vary depending on the installation directory given.

If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.

Thank you for your understanding.

Kind regards,
Rafael P. Sperafico
Atlassian Support

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events