No sonar-runner option in jenkins?

筅森魡賤 提交于 2019-12-01 07:15:28

Ok. So, if I understand well:

  1. Going into Manage Jenkins' -> 'Manage Plugin' -> tab 'Installed' in the Plugin manager, you can see 'Jenkins Sonar plugin' in the installed plugins. --> Beware that there is a SonarGraph plugin that is not the proper one. Please verify you have this: http://i.stack.imgur.com/SNZLG.jpg

  2. You say you can install the sonar server part in Jenkins. I understand you refer to this doc http://docs.codehaus.org/display/SONAR/Configuring+SonarQube+Jenkins+Plugin#ConfiguringSonarQubeJenkinsPlugin-AddingSonarQubeServer, and more specifically section 'Adding SonarQube Server' point 2 and 3. --> Can you confirm that you have this 'Sonar' part under you Jenkins configuration ?

  3. If yes to previous 1 & 2, you should also have the SonarQube Runner part available in Jenkins, as in the previous doc and the post on my blog. --> Can you confirm this is the part that is lacking ?

  4. Can you try this: Jenkins -> New Job -> Select 'Build a free-style software project', enter a job Name -> click Ok. Section Build -> 'Add build Step': can you see the 'Invoke standalone Sonar analysis' menu : http://i.stack.imgur.com/9TmFr.jpg ?

  5. You have SonarQube runner installed and correctly configured: http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+SonarQube+Runnerhttp://docs.codehaus.org/display/SONAR/Installing+and+Configuring+SonarQube+Runner

Do not hesitate to ask for further precision.

In newer versions of Jenkins (like 2.2), the sonarqube runner configuration is under

Manage Jenkins > Global Tool Configuration

Thats the solution :)

I can see both Sonar (just above E-mail Notification section) and Sonar Runner in Jenkins > Configure System section.

I have Jenkins 1.547 and Sonar Plugin 2.1 installed. However, please note that, as per this link, Jenkins 1.491+ and Sonar plugin 2.1 will suffice.

Ankits

I faced similar issue. Solution is that you need to run sonar-runner outside jenkins once and then restart jenkins.

To run sonar-runner outside jenkins. Download sonar-runner as mentioned in the steps @ http://docs.sonarqube.org/display/SONAR/Installing

Create a sonar-project.properties file at the root of you code base. below link describes the content of the file. http://docs.sonarqube.org/display/SONAR/Analyzing+with+SonarQube+Runner

Run sonar-runner.bat from the codebase.

Once the sonar analysis is done, Start Jenkins Jenkins will now show the sonar-runner option in configure page.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!