我有两条Azure DevOps管道:A管线:主管线B: PR审查管道
因此,管道B有CI/CD与我的github回购,一旦提出了一个拉请求,管道作业被触发。该管道只包含RestAPI任务,它以某些模板参数作为主体调用管道A。
问题是。我如何从管道B触发管道A与github源分支,这是为特定的拉请求。
谢谢
发布于 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管道样品:
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"https://stackoverflow.com/questions/73309727
复制相似问题