【发布时间】:2019-04-01 10:42:29
【问题描述】:
我们有 azure 构建管道,一些在可视化编辑器中,少数在 yaml 中。 我正在尝试将声纳云分析添加到这些管道中。 这在可视化编辑器中工作正常,我正在从可视化编辑器复制相同的 yaml 以添加到现有的 yaml 管道中。我收到此错误。
加载 YAML 构建管道时出错。服务连接名称 00000000-0000-0000-0000-000000000000 不明确。
到目前为止我所做的, 检查以下资源并尝试了那里提到的解决方案,
- https://github.com/Microsoft/azure-pipelines-yaml/issues/31
- VSTS anybody managed to use "secure file" in azure-pipelines.yml?
- https://github.com/Microsoft/azure-pipelines-agent/issues/1809
- 创建新的 azure yaml 管道
- 在项目设置的服务连接中验证 sonarcloud 连接。
这是我的任务定义
- task: SonarSource.sonarcloud.****************.SonarCloudPrepare@1
displayName: 'Prepare analysis on SonarCloud'
inputs:
SonarCloud: *************
organization: ****
projectKey: "******"
projectName: "************"
【问题讨论】:
-
我遇到了这个错误,我认为这意味着您有 2 个同名的服务连接,并且您不是按 guid 而是按名称引用它,所以它无法确定其中一个是你打电话,我也编辑了你的任务定义,你有很多空格,试试这样?
标签: azure-devops yaml azure-pipelines azure-pipelines-build-task sonarcloud