Azure Pipelines - CI Trigger on feature branch doest work with YAML

☆樱花仙子☆ 提交于 2020-01-25 10:11:10

问题


CI doesn't trigger when I change anything in my feature/* branch. I configured a YAML on Azure pipeline -

trigger:
  branches:
    include:
     - feature/*

I also tried the other style of configuration - again unsuccessful

 trigger:
  - feature/*

Also tried with the complete feature name like feature/my-feature

However when I override the YAML trigger and use branch filters to point to the specific feature branch the CI works when I make changes in the branch.

I followed this official documentation


回答1:


Azure Pipelines - CI Trigger on feature branch doest work with YAML

You should set the yaml file in one of branch under the feature folder.

Since you set the trigger with feature/*, but there is no branch named feature, we could not set the the yaml file in feature brance of the repo. So, we need to set the the yaml file in one of branch under the feature folder, like: feature/Test.

In this case, when I change anything in my feature/* branch, like feature/Test2, it will trigger this pipeline.

Hope this helps.




回答2:


the one reason this could happen - the yaml file is not present in the feature branch. the decision to trigger the build or not comes when a commit is pushed to a branch, based on the content of the yaml file in the branch. if the file is not there, obviosuly nothing will be built.



来源:https://stackoverflow.com/questions/59459461/azure-pipelines-ci-trigger-on-feature-branch-doest-work-with-yaml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!