1
votes

I have my git repository hosted on Azure DevOps. I created a new yaml based build pipeline in the master branch and have set the trigger section to two existing branches. Other branches don't have a azure-pipeline.yml file nor any kind of branch policies are set for this DevOps project.

trigger:
  batch: 'true'
  branches:
    include:
    - master
    - develop

The trigger gets invoked for every change in the master branch as expected. But is ignoring any pushes to the develop branch.

If I configure a build pipeline with the visual editor and define the exact two branches there, for every push a build will be triggered.

Any idea how Azure Pipeline respects the build definition also for other branches without copy and pasting the whole definition for every possible branch?

1
this looks like it should, so the only way this might not work - your branch is not called develop4c74356b41
There is definitelly a develop branch ;) I also created a brand new DevOps Project and experience the same. It's not only the develop branch. It's every other also.dannyyy
no, it works perfectly fine, check your indentation or something4c74356b41
Have a look at the new project: dev.azure.com/tpcemedia/BuildTest pushing to develop triggers nothing.dannyyy
A fix for this issue should have rolled out last week to all Azure Repo's accounts.jessehouwing

1 Answers

1
votes

Build trigger is not invoked on push for Azure Git repositories

I have created a sample with the syntax:

trigger:
  batch: 'true'
  branches:
    include:
    - master
    - Dev

And it works fine on my side. Then I check the new project you provided, but I found that the .yml file is incomplete and does not contain a trigger: node.

So, to resolve this issue, we need to double check the .yml file you modified in under the master branch, and you build .yml file is you modified.

Besides, when we edit the build pipeline, there is a extended button, we could select the option Triggers to set the build trigger with visual editor:

enter image description here

If above not help you, you can try to create a new build pipeline, set the trigger only with Develop branch, check if it works fine, then return to the previous with master and develop branch.

If all of the above methods are not worked, you may need share a detailed sample and some steps, the reason for this problem may be hidden in the corner we ignore.

Hope this helps.