自动将新的Sonar项目与自定义质量配置文件和质量门相关联 [英] Automatically associate new Sonar project with custom quality profile and quality gate
问题描述
我们的Sonar用例为我们存储库的每个分支创建了新的Sonar项目.我们如何自动将新的分支项目与(非默认)质量配置文件和质量门相关联?
Our use case for Sonar creates new Sonar projects for each branch of our repository. How do we automatically associate the new branch project with a (non-default) Quality Profile and Quality Gate?
如果需要的话,我们正在Maven项目中运行它.
We're running this in a Maven project if that's relevant.
推荐答案
我们公司内部存在相同的问题,唯一的解决方案是使用不推荐使用的属性sonar.profile
(
We had the same issue, within our company, and the only solution was to use the deprecated attribute sonar.profile
(https://docs.sonarqube.org/display/SONAR/Analysis+Parameters).
旁注: 通常,关于如何分析分支机构也有一个有趣的观点. sonarSource的一般建议建议仅对短暂的分支使用预览模式.事实上,具有比注释问题更丰富的功能的位桶式插件令人遗憾地需要基于分支的分析.
Sidenote: Generally there is also a interesting view on how to analyze branches. The general recommendation from sonarSource suggests to only use preview modes for short living branches. As a fact bitbucket-plugins with a richer featureset than just commenting issues, sadly need branch based analysis.
https://jira.sonarsource.com/browse/SONAR-5370 -根据声纳任务,该属性将在4.5.1中删除
https://jira.sonarsource.com/browse/SONAR-5370 - the property will be removed in 4.5.1 based on the sonar task
这篇关于自动将新的Sonar项目与自定义质量配置文件和质量门相关联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!