简体   繁体   中英

No sonar-runner option in jenkins?

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.)

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

Manage Jenkins > Global Tool Configuration

Thats the solution :)

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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM