简体   繁体   English

Azure devops Pull Request 中的 Sonarqube Quality Gate 状态链接始终指向 localhost

[英]Sonarqube Quality Gate status link in Azure devops Pull Request always points to localhost

The Quality gate status url in a PR is always pointing to localhost and not to the actual sonarqube server. PR 中的质量门状态 url 始终指向本地主机,而不是实际的 sonarqube 服务器。 The detailed analysis report link in the build pipeline is working fine.构建管道中的详细分析报告链接工作正常。 SonarQube 8.2 Enterprise Edition, Scanner Latest from Azure Devops Marketplace. SonarQube 8.2 企业版,扫描仪最新来自 Azure Devops Marketplace。 Create a PR request and trigger a Build with Sonar Analysis.创建 PR 请求并使用声纳分析触发构建。 Add a Build policy to validate Sonar Quality Gate Click on the link.添加构建策略以验证 Sonar Quality Gate 单击链接。 It routes to localhost and not the actual server.它路由到 localhost 而不是实际的服务器。

在此处输入图像描述

When I click on “Quality Gate failed” hyperlink, it takes me to http://localhost/dashboard?id= ***&pullRequest=952.当我点击“Quality Gate failed”超链接时,它会将我带到http://localhost/dashboard?id= ***&pullRequest=952。 Ideally it should point to the server where I have my sonarqube hosted.理想情况下,它应该指向我托管 sonarqube 的服务器。

I found the resolution for this we need to go into Administration > General > Server base URL update the ' Server base URL '.我找到了解决此问题的方法,我们需要将 go 进入管理 > 常规 > 服务器基础 URL更新“服务器基础 URL ”。 on sonarqube portal.在 sonarqube 门户上。

Make sure the following has been configured in SonarQube:确保已在 SonarQube 中配置以下内容:

sonar.core.serverBaseURL is set to the base url of SonarQube including the port number. sonar.core.serverBaseURL 设置为 SonarQube 的基础 url,包括端口号。

Also double check if your proxy firewall which block the request from the SonarQube server to TFS.还要仔细检查您的代理防火墙是否阻止了从 SonarQube 服务器到 TFS 的请求。

Try to add your TFS server host name in “http.nonProxyHosts” in your “sonar.properties” file.尝试在“sonar.properties”文件的“http.nonProxyHosts”中添加 TFS 服务器主机名。

Otherwise, this may related to your TFS version.否则,这可能与您的 TFS 版本有关。 Try to upgrade to TFS 2018.Update3.2 and above.尝试升级到TFS 2018.Update3.2及以上。

More details take a look at this similar question: TFS Pull Request Decoration Not Working更多细节请看这个类似的问题: TFS Pull Request Decoration Not Working

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

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