Search code examples
azure-devopsazure-pipelines

Azure DevOps pipeline trigger not working


Why would a CI branch trigger for a pipeline not be working?

trigger:
  batch: true
  branches:
    include:
      - main
      - dev
      - sprint
      - 'sprint-name'

# wild cards can be used in branch triggers, but only at a "directory" level, and we don't generally create those
#example - sprint/* would get sprint/name1 and sprint/name2, but sprint* doesn't match anything (not sprint-name1, not sprint/name2, nothing)

All of the branches except 'sprint-name' work, I've tried sprint-name as well. I have checked the change to the yml file into both main and the branch. The only thing I can think of is to rename the branch without the dash, but I really don't want to do that unless I have to.


Solution

  • Go to the Azure pipeline (where you see the run history), click on the Edit button, then click on the 3 vertical dots (aka vertical ellipsis, aka hotdog menu) and choose "Triggers". See if the "Override the YAML continuous integration trigger from here" checkbox is checked. If so, that is your problem.