Azure Devops Pipeline 资源触发错误

问题描述 投票:0回答:1

我有一个包含多个可执行项目的

C# solution
,我想创建一个管道来构建exe文件和依赖项,以及另一个管道来使用高级安装程序生成多个安装程序。

在构建管道中,我最后使用了

PublishPipelineArtifact@1
任务。

我发现我有两种选择来实现这一目标。 使用经典的发布管道(它可以正常工作)。 另一个选项似乎是使用由第一个管道触发的 yml 管道。我已按照文档完成此操作,但配置触发器时出现错误。

配置触发器编辑失败并重新保存管道

trigger: none

pool:
   name: Default
   demands: 
   - Agent.Name -equals 'SelfHostedAgent'

resources:
  pipelines:
  - pipeline: 'projectCi'
    source: '\Folder\Project-CI' 
    trigger: true 
azure-pipelines azure-pipelines-release-pipeline azure-pipelines-yaml
1个回答
1
投票

在 YAML 示例中,您在管道资源的源字段中定义项目名称。

格式有问题。您需要在Project字段中定义项目名称。

您可以使用以下格式:

trigger: none

pool:
   name: Default
   demands: 
   - Agent.Name -equals 'SelfHostedAgent'

resources:
  pipelines:
  - pipeline: 'projectCi'
    project: 'Projectname'
    source: 'Project-CI' 
    trigger: true 

更详细的信息,您可以参考此文档:定义管道资源

© www.soinside.com 2019 - 2024. All rights reserved.