简体   繁体   English

如何使用Jenkins和Perforce配置Sonarqube

[英]How to configure Sonarqube with Jenkins and Perforce

我如何用Jenkins和Perforce实现Sonarqube,我已经在服务器中配置了Sonarqube,我们的源代码是在Perforce中,我知道我们可以在Sonarqube中安装perforce插件,所以如果我在Sonarqube中配置perforce插件,它将获取最新的代码从perforce进行分析?

SonarQube will not fetch source code by itself. SonarQube不会自行获取源代码。 You have to configure Jenkins to do that (there is a Jenkins plugin for Perforce ). 您必须配置Jenkins来做到这一点( Perforce有一个Jenkins插件 )。

Once your Jenkins job properly fetch source code, you can run a SonarQube analysis using a SonarQube Scanner step . 一旦您的Jenkins作业正确获取了源代码,就可以使用SonarQube Scanner步骤运行SonarQube分析。

You should now have your source code properly analyzed and browsable in SonarQube. 现在,您应该在SonarQube中对源代码进行正确的分析和浏览。

On top of that you can install and configure the SonarQube Perforce plugin that will collect blame of all analyzed files and then allow to automatically assign issues to the last committer (but that's not mandatory). 最重要的是,您可以安装和配置SonarQube Perforce插件 ,该插件将收集所有分析文件的责任,然后允许将问题自动分配给最后的提交者(但这不是强制性的)。

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

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