Continuous Integration is a well-established practice. With every commit you build your whole application and run all tests. This helps you to find integration problems right then and spares you the dreadful integration hell in the night before a release.
Azure DevOps has a nice little option to enable Continuous Integration for a specific branch. All you need to do is to open the build definition, go to the Trigger tab and select the checkbox in front of Enable continuous integration. You can select the branch to monitor from the dropdown list:
The set-up for all your feature branches is nearly the same. Remove the entry for branch filters and add a new one. In the search box you enter feature/* and hit enter:
Make sure that your feature branches are located under feature. If they are under features/*, this will not work. Should this mishap happen to you, then simply remove the wrong path and add the correct one.
If you use YAML for your build definition, it is even simpler. You can specify your feature/* directly in the build definition in the trigger section:
1 2 3 |
trigger: - master - feature/* |
As soon as this is set every push to a feature branch triggers your Continuous Integration build. See the detailed documentation from Microsoft for more details and other options.