No sonar-runner option in jenkins?

允我心安 提交于 2019-12-19 08:49:46

问题


I'm looking to install sonarQube on our jenkins server.

The documentation i can find tells me to configure sonar-runner in

Jenkins --> manage Jenkins -->  Configure system

however there is no 'sonar runner' option there. There is a 'sonar' option where i configured my sonar server, and the sonar plugin is installed and up to date.

How do i get the sonar-runner configuration to show up?

(We want the standalone sonar job not the maven on as this is a project without maven.)


回答1:


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.




回答2:


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

Manage Jenkins > Global Tool Configuration

Thats the solution :)




回答3:


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.




回答4:


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.



来源:https://stackoverflow.com/questions/25726296/no-sonar-runner-option-in-jenkins

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