1

我在 Azure 虚拟机中设置了 SonarQube。

声纳-5.4

MSBuild.SonarQube.Runner-2.0

位于 9000 端口的 SonarQube 网站已启动并正在运行。

( http://something.regionname.cloudapp.azure.com:9000/ )

现在,如何从本地竹子构建服务器执行 sonarrunner ?

有哪些配置设置和其他更改?

早些时候,我确实在本地成功地设置了带有竹子的 sonarqube,因为都是本地路径。

但是现在,我想在不同的服务器上安装 sonarqube 和竹子。如何连接这两者?

请详细提供意见/设置。

谢谢

巴努。

4

3 回答 3

1

有一个 Bamboo 插件:https ://marketplace.atlassian.com/plugins/com.marvelution.bamboo.plugins.sonar.tasks/server/overview

我没用过,也不知道它是否支持 SonarQube Scanner for MSBuild(我对此表示怀疑。)

也许您最好的选择是将 Bamboo 视为一个花哨的 CLI,并按照说明从命令行进行分析。IE

  1. 在 Bamboo 服务器上为 MSBuild 安装配置 SonarQube 扫描仪
  2. 通过 Bamboo 运行命令:
    1. MSBuild.SonarQube.Runner.exe begin /k:"sonarqube_project_key" /n:"sonarqube_project_name" /v:"sonarqube_project_version"
    2. 构建项目
    3. MSBuild.SonarQube.Runner.exe end
于 2016-05-04T13:27:52.100 回答
0

Mibex Software 出色的免费Sonar for Bamboo已发展成为 Bamboo 的规范(和受支持的)SonarQube 集成 - 它提供了Bamboo 任务来使用 Sonar for Maven、Gradle 和 SonarRunner 分析项目,支持基于 Sonar 的代码审查的自动分支-

于 2016-11-04T17:51:57.950 回答
0

竹服务器具有可用于执行代码的 Sonar Runner 任务。您需要在根文件夹中有 sonar-project.properties 文件。

需要做的设置有:

sonar.projectKey=<projectkey>
sonar.projectName=<projectname>
sonar.projectVersion=1.0.0
sonar.sourceEncoding=UTF-8
# Enable the Visual Studio bootstrapper
sonar.visualstudio.enable=true
# Code Coverage
#placeholder-for-modular-coverage-reporting
# Unit Test Results
#placeholder-for-modular-unit-test-reporting
# Required only when using SonarQube < 4.2
sonar.language=cs
# FXCop
# This property is set because it is required by the SonarQube Runner.
# But it is not taken into account because the location of the source
# code is retrieved from the .sln and .csproj files.
sonar.sources=.
# If you have multiple solution files then use the current one by setting up the below property
sonar.visualstudio.outputPaths=
# Test projects can be imported as unit test code (which is not analyzed by coding rules) using the regular expression property
#sonar.visualstudio.testProjectPattern=
#sonar.visualstudio.solution=YourSolution.sln
sonar.visualstudio.skipIfNotBuilt=true

这个Msbuild Sonar可能对你有帮助。

于 2016-05-11T10:27:50.063 回答