<p>If you have set a CI trigger make sure you have set the filter to the exact branch which you need the build to be triggered and not the entire repository which is the default case.</p>

CC BY-SA 4.0
2020-05-14T09:07:50.080Z
2020-05-14T09:07:50.080Z
Jerry
<p>You might consider using the pipeline trigger YAML override feature.</p>

<p>Go to the pipeline designer/editor view. Next to the "Run" button is the ellipsis. From that menu, select "Triggers". From the "Continuous Integration" section, you can choose "Override the YAML continuous integration trigger from here". Then you can tailor the pipeline triggers very specifically without the need to define them in the YAML.</p>

CC BY-SA 4.0
2020-10-28T06:06:36.710Z
Can you use wildcards like feature/* when you specify the overrides? I couldn't find that anywhere.
Ε Г И І И О
CC BY-SA 4.0
2020-11-03T03:23:08.447Z
From what I'm seeing, you can only select a specific, existing branch. You should be able to have the `build` branch "include" only the build branch in the filter list. Then have the feature `branch` Exclude the `build branch` in the filter list. This should allow arbitrary feature/* branches to build only on the right pipeline.
Peter
CC BY-SA 4.0
2020-11-03T03:25:05.923Z
I realized also, did you update the YAML file in all the branches? I'm not sure what branch the pipeline pulls the YAML front if not the branch for which you are requesting the build. I'm personally not a fan of having the YAML dictate what the build trigger rules are, since they can be based on branches and, of course, the YAML is an asset in the source and thus in 1 or more branches. Feels to tightly coupled to me.
Peter
CC BY-SA 4.0
2020-06-17T20:24:37.997Z
2020-06-17T20:24:37.997Z
Peter
<p>I have a Repository in Azure Repos which has branches as master, build, feature. Build Branch and Feature branches have their own pipelines code in the azure-pipelines.yaml in the branch itself respectively. So that they can have their dedicated pipelines</p>

<p>The problem is that When I commit to the Build branch or in the feature branch then, both the pipelines are triggered.</p>

<p>I have written in my azure-pipelines.yml </p>

<pre><code>trigger:
  branches:
    include:
        - build
    exclude:
       - feature
</code></pre>

CC BY-SA 4.0
2020-05-06T10:32:28.773Z
I have to ask, are "build" and "feature" spelled correctly?
Crowcoder
CC BY-SA 4.0
2020-05-06T17:05:21.630Z
yes it is spelled correctly
Pradeep Upadhyay
CC BY-SA 4.0
2020-07-21T23:36:23.900Z
Is it just feature or feature/something?
Dhruv Patel
<azure-devops><azure><azure-pipelines>
Azure Devops Pipelines Triggers not working
Pradeep Upadhyay
# Azure Devops Pipelines Triggers not working

(Asked by: username_0 on 2020-05-06)

I have a Repository in Azure Repos which has branches as master, build, feature. Build Branch and Feature branches have their own pipelines code in the azure-pipelines.yaml in the branch itself respectively. So that they can have their dedicated pipelines
The problem is that When I commit to the Build branch or in the feature branch then, both the pipelines are triggered.
I have written in my azure-pipelines.yml 
trigger:
  branches:
    include:
        - build
    exclude:
       - feature

**Tags:** azure-devops, azure, azure-pipelines

> **Comments:**
> **username_1**: I have to ask, are "build" and "feature" spelled correctly?  
> **username_0**: yes it is spelled correctly  
> **username_2**: Is it just feature or feature/something?  

---

## 2 answers

### Answer by username_3 on 2020-05-14. Score: 1

If you have set a CI trigger make sure you have set the filter to the exact branch which you need the build to be triggered and not the entire repository which is the default case.


---

### Answer by username_4 on 2020-06-17. Score: 1

You might consider using the pipeline trigger YAML override feature.

Go to the pipeline designer/editor view. Next to the "Run" button is the ellipsis. From that menu, select "Triggers". From the "Continuous Integration" section, you can choose "Override the YAML continuous integration trigger from here". Then you can tailor the pipeline triggers very specifically without the need to define them in the YAML.

> **Comments:**
> **username_5**: Can you use wildcards like feature/* when you specify the overrides? I couldn't find that anywhere.  
> **username_4**: From what I'm seeing, you can only select a specific, existing branch. You should be able to have the `build` branch "include" only the build branch in the filter list. Then have the feature `branch` Exclude the `build branch` in the filter list. This should allow arbitrary feature/* branches to build only on the right pipeline.  
> **username_4**: I realized also, did you update the YAML file in all the branches? I'm not sure what branch the pipeline pulls the YAML front if not the branch for which you are requesting the build. I'm personally not a fan of having the YAML dictate what the build trigger rules are, since they can be based on branches and, of course, the YAML is an asset in the source and thus in 1 or more branches. Feels to tightly coupled to me.  

---

