首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用管道github从另一个管道触发管道

用管道github从另一个管道触发管道
EN

Stack Overflow用户
提问于 2022-08-10 16:27:22
回答 1查看 69关注 0票数 0

我有两条Azure DevOps管道:A管线:主管线B: PR审查管道

因此,管道B有CI/CD与我的github回购,一旦提出了一个拉请求,管道作业被触发。该管道只包含RestAPI任务,它以某些模板参数作为主体调用管道A。

问题是。我如何从管道B触发管道A与github源分支,这是为特定的拉请求。

谢谢

EN

回答 1

Stack Overflow用户

发布于 2022-08-11 02:31:17

您可以为管道B中的源分支设置PR触发器

然后为A管道设置管道资源触发器,然后A管道在B管道完成后自动运行:https://learn.microsoft.com/en-us/azure/devops/pipelines/process/pipeline-triggers?view=azure-devops

A管道样品:

代码语言:javascript
复制
pool:
  vmImage: ubuntu-latest

# Pipeline A YAML pipeline
# We are setting up a pipeline resource that references the Pipeline B
# and setting up a pipeline completion trigger so that Pipeline A
# runs when a run of Pipeline B completes
resources:
  pipelines:
  - pipeline: PR # Name of the pipeline resource.
    source: Pipeline B # The name of the pipeline referenced by this pipeline resource.
    trigger: true # Run Pipeline A when any run of Pipeline B completes

steps:
- bash: echo "Pipeline A runs after Pipeline B completes"
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73309727

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档