简体   繁体   English

SonarQube 7.1和TFS 2018发布质量门结果失败

[英]SonarQube 7.1 and TFS 2018 Publish Quality Gate Results Fail

  1. Created a build definition in TFS 2018 在TFS 2018中创建了构建定义
  2. Add step Prepare analysis on SonarQube. 添加步骤在SonarQube上准备分析。 3 Tokenizer: Transform Source Files 3令牌生成器:转换源文件
  3. NuGet Restore NuGet恢复
  4. Build Solution: .NET 生成解决方案:.NET
  5. VsTest - testAssemblies VSTest-testAssemblies
  6. Run Code Analysis 运行代码分析
  7. Publish Quality Gate Result 发布质量门结果

    Step 8 Fails with below error: 步骤8失败,并出现以下错误:

    Evaluating condition for step: 'Publish Quality Gate Result' 步骤评估条件:“发布质量门结果”

    Evaluating: succeeded() 评估:successed()

    Evaluating succeeded: 评估成功:

    (Boolean) True (布尔值)真

    Expanded: True 展开式:真

    Result: True 结果:正确

    Starting: Publish Quality Gate Result 开始:发布质量门结果

============================================================================== 2018-06-04T17:34:41.6970611Z Task : Publish Quality Gate Result 2018-06-04T17:34:41.6971068Z Description : Publish SonarQube's Quality Gate result on the VSTS/TFS build result, to be used after the actual analysis. ================================================== ============================= 2018-06-04T17:34:41.6970611Z任务:发布Quality Gate结果2018-06-04T17: 34:41.6971068Z描述:将SonarQube的质量门结果发布到VSTS / TFS构建结果上,以便在实际分析之后使用。 2018-06-04T17:34:41.6971496Z Version : 4.2.0 2018-06-04T17:34:41.6971818Z Author : sonarsource 2018-06-04T17:34:41.6972216Z Help : More Information 2018-06-04T17:34:41.6972761Z ============================================================================== 2018-06-04T17:34:41.6971496Z版本:4.2.0 2018-06-04T17:34:41.6971818Z作者:sonarsource 2018-06-04T17:34:41.6972216Z帮助: 更多信息 2018-06-04T17:34: 41.6972761Z ================================================= =============================

agent.TempDirectory=D:\source\agent\_work\_temp

loading inputs and endpoints

loading 

ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN

loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION

loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION

loading INPUT_POLLINGTIMEOUTSEC

loading SECRET_SONARQUBE_ENDPOINT

loaded 5

Agent.ProxyUrl=undefined

Agent.CAInfo=undefined

Agent.ClientCert=undefined

Agent.SkipCertValidation=undefined

SONARQUBE_SCANNER_PARAMS={"sonar.host.url":"http://localhost:9000/","sonar.login":"admin","sonar.password":"admin","sonar.projectKey":"nao-webapi","sonar.projectName":"nao-webapi","sonar.projectVersion":"1.0","sonar.cs.vscoveragexml.reportsPaths":"**/*.coveragexml","sonar.verbose":"true"}

SONARQUBE_ENDPOINT=********

API GET: '/api/metrics/search' with query "{"f":"name","ps":500}"

Response: 401 Body: "undefined" 响应:401正文:“未定义”

API GET '/api/metrics/search' failed, status code was: 401

Could not fetch metrics

Processed: ##vso[task.issue type=error;][SQ] Could not fetch metrics

API GET '/api/metrics/search' failed, status code was: 401

Processed: ##vso[task.issue type=error;][SQ] API GET '/api/metrics/search' failed, status code was: 401

 Agent.BuildDirectory=D:\source\agent\_work\21

 defaultRoot: 'D:\source\agent\_work\21'

 findOptions.followSpecifiedSymbolicLink: 'true'

 findOptions.followSymbolicLinks: 'true'

 matchOptions.debug: 'false'

I get the results, can't figure out why this is not working. 我得到的结果,无法弄清楚为什么这不起作用。

The extension site indicates, SonarQube extension works with: 扩展站点指示,SonarQube扩展适用于:

  • Visual Studio Team Services Visual Studio团队服务
  • Team Foundation Server 2017 Update 2 Team Foundation Server 2017更新2
  • Team Foundation Server 2017 Update 3 Team Foundation Server 2017更新3
  • Team Foundation Server 2018 Team Foundation Server 2018

No TFS 2018 Update 2 yet. 尚无TFS 2018 Update 2。

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

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