问题
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