【发布时间】:2022-01-08 09:32:06
【问题描述】:
我的 Azure DevOps 项目有两个存储库。一个用于云基础设施部署,另一个包含我的应用程序代码。
我有一个 YAML 管道,它在任何这些 repos 构建管道完成后触发。管道看起来有点像这样:
resources:
pipelines:
- pipeline: MyProject-Code
- pipeline: MyProject-Infrastructure
jobs:
- job: DeployInfrastructure
steps:
# Here are the tasks the deploy the project infrastructure
- job: DeployCode
steps:
# Here are the tasks that deploy the code
我想在 DeployInfrastructure 作业上设置一个条件,以便仅在触发管道是基础设施管道时执行它,因为如果更改仅影响应用程序代码,我不需要重新部署它。
但是,在阅读documentation from Microsoft 时,似乎没有一种非常直接的方法。
【问题讨论】:
标签: azure-devops yaml azure-pipelines devops