简体   繁体   English

如何在推送另一个主题分支期间在一个主题分支中触发 azure 管道

[英]How to trigger azure pipeline in one topic branch during push for another topic branch

My azure devops pipileine's yaml file is not in master branch of bitbucket.我的 azure devops pipileine 的 yaml 文件不在 bitbucket 的主分支中。 Its in another branch inside master branch (master/pipeline-branch).它在主分支(主/管道分支)内的另一个分支中。 I am trying to trigger that build when there is a push to another topic branch which is also not the master branch.当推送到另一个也不是主分支的主题分支时,我试图触发该构建。 (master/topic/secondary). (主/主题/次要)。

In my yaml file I have written the trigger like this.在我的 yaml 文件中,我编写了这样的触发器。

trigger: - topic/secondary触发器: - 主题/次要

But no build is triggered when I push a file to secondary branch.但是当我将文件推送到辅助分支时不会触发构建。

you need to cherry pick\merge commits with this file to the secondary branch or just commit the yaml file to the secondary branch.您需要将带有此文件的提交选择\合并到辅助分支,或者只需将 yaml 文件提交到辅助分支。 when a commit is made a decision to start the build or not is being made by evaluating the yaml file inside the branch a commit was made to.当做出提交时,通过评估分支内的 yaml 文件来决定是否开始构建。 if the file doesnt exist in that branch - there is nothing to trigger如果该文件不存在于该分支中 - 没有什么可以触发

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM