I'm migrating a TFS repo to git and looking at different branching strategies. I like the one suggested by Microsoft here https://docs.microsoft.com/en-us/azure/devops/repos/git/git-branching-guidance?view=azure-devops but am struggling a bit with the release branches.
The repository is a monorepo with a couple of different applications. When I create a new release branch I would ideally like it to trigger the pipelines to build the applications which have been changed since the last release, and not the pipelines for all the applications.
The workflow that I am trying to accomplish:
- Develop on the main branch via feature branches and pull requests
- Commits to the main branch will trigger builds to our QA environment with path triggers. For example, a commit to /ApplicationA will trigger the pipeline build for ApplicationA
- When it is time to prepare for a release, create a new release branch which will trigger builds and deploy the release candidate to our UAT environment
When I create a new release branch, I want it to trigger the pipelines for all applications which have changed since latest commit to the previous release branch.
Is this possible to set up with pipeline triggers or am I better off with a long running release branch instead of a separate one for every new release?