How to provide Sonar Runner home path to sonar4bamboo

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 vote

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

 

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

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

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

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

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

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

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>

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,490 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you