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

时间:2018-06-01 19:13:23

标签: tfs sonarqube

  1. 在TFS 2018中创建了构建定义
  2. 添加步骤在SonarQube上准备分析。 3 Tokenizer:转换源文件
  3. NuGet Restore
  4. 构建解决方案:.NET
  5. VsTest - testAssemblies
  6. 运行代码分析
  7. 发布质量门结果

    步骤8失败,出现以下错误:

    评估步骤的条件:'发布质量门结果'

    评估:成功()

    评估成功:

    (布尔值)True

    扩展:真实

    结果:是

    开始:发布质量门结果

  8. =============================================== =============================== 2018-06-04T17:34:41.6970611Z任务:发布质量门结果 2018-06-04T17:34:41.6971068Z描述:在VSTS / TFS构建结果上发布SonarQube的质量门结果,以便在实际分析后使用。 2018-06-04T17:34:41.6971496Z版本:4.2.0 2018-06-04T17:34:41.6971818Z作者:sonarsource 2018-06-04T17:34:41.6972216Z帮助:More Information 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}"
    

    回应: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'
    

    我得到的结果,无法弄清楚为什么这不起作用。

1 个答案:

答案 0 :(得分:0)

The extension site表示,SonarQube扩展适用于:

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

尚未获得TFS 2018更新2。