简体   繁体   English

詹金斯没有声纳​​ - 跑步选项吗?

[英]No sonar-runner option in jenkins?

I'm looking to install sonarQube on our jenkins server. 我想在我们的jenkins服务器上安装sonarQube。

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.) (我们希望独立的声纳工作不是maven,因为这是一个没有maven的项目。)

In newer versions of Jenkins (like 2.2), the sonarqube runner configuration is under 在较新版本的Jenkins(如2.2)中,sonarqube runner配置正在进行中

Manage Jenkins > Global Tool Configuration 管理Jenkins>全局工具配置

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. 在插件管理器中进入管理Jenkins' - >'管理插件' - >选项卡'已安装',您可以在已安装的插件中​​看到'Jenkins Sonar插件'。 --> Beware that there is a SonarGraph plugin that is not the proper one. - >请注意,SonarGraph插件不是正确的插件。 Please verify you have this: http://i.stack.imgur.com/SNZLG.jpg 请确认您有: http//i.stack.imgur.com/SNZLG.jpg

  2. You say you can install the sonar server part in Jenkins. 你说你可以在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 ? 我理解你参考这个文档http://docs.codehaus.org/display/SONAR/Configuring+SonarQube+Jenkins+Plugin#ConfiguringSonarQubeJenkinsPlugin-AddingSonarQubeServer ,更具体地说是“添加SonarQube服务器”第2和第3节。 - >你可以确认你在Jenkins配置下有这个'声纳'部分吗?

  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. 如果是之前的1和2,那么你也应该在Jenkins中使用SonarQube Runner部分,就像之前的文档和我博客上的帖子一样。 --> 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 ? Section Build - >'Add build Step':你能看到'Invoke standalone Sonar analysis'菜单: 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 您已安装并正确配置了SonarQube运行器: http ://docs.codehaus.org/display/SONAR/Installing+and+Configuring+SonarQube+Runnerhttp://docs.codehaus.org/display/SONAR/Installing+and+Configuring + SonarQube +亚军

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. 我可以在Jenkins > Configure System部分看到Sonar (就在电子邮件通知部分上方)和Sonar Runner

在此输入图像描述

I have Jenkins 1.547 and Sonar Plugin 2.1 installed. 我安装了Jenkins 1.547和Sonar Plugin 2.1。 However, please note that, as per this link, Jenkins 1.491+ and Sonar plugin 2.1 will suffice. 但请注意,根据链接,Jenkins 1.491+和Sonar插件2.1就足够了。

I faced similar issue. 我遇到了类似的问题。 Solution is that you need to run sonar-runner outside jenkins once and then restart jenkins. 解决方案是你需要在jenkins之外运行一次sonar-runner,然后重新启动jenkins。

To run sonar-runner outside jenkins. 在詹金斯之外运行声纳跑步者。 Download sonar-runner as mentioned in the steps @ http://docs.sonarqube.org/display/SONAR/Installing 下载步骤@ http://docs.sonarqube.org/display/SONAR/Installing中提到的声纳 - 跑步者

Create a sonar-project.properties file at the root of you code base. 在代码库的根目录下创建一个sonar-project.properties文件。 below link describes the content of the file. 下面的链接描述了文件的内容。 http://docs.sonarqube.org/display/SONAR/Analyzing+with+SonarQube+Runner http://docs.sonarqube.org/display/SONAR/Analyzing+with+SonarQube+Runner

Run sonar-runner.bat from the codebase. 从代码库运行sonar-runner.bat。

Once the sonar analysis is done, Start Jenkins Jenkins will now show the sonar-runner option in configure page. 声纳分析完成后,Start Jenkins Jenkins现在将在配置页面中显示声纳 - 跑步者选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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