Through this blog, just wanted to share a strategy which can be employed in Azure Dev Ops to
- Segregate code in different branches of development and other environments like production
- Providing a framework of doing code review before the checked in dev code is merged with production branch.
- Ability to configure automated deployments on production environment when code is updated in the production branch.
a) At the start, we will have two branches. To implement further security on them, we can configure branch security.
b) When the code is checked in to build branch, we can create “Pull Requests”. On this step we can specify the related work items and the committed code that was checked in.
As shown in the above screenshot, the approve can refer to the commits, files changed , related work items in the same window.
c) If the reviewer selects merge, the two branches are merged together.
Once changes are merged on the release branch, we can configure build pipeline to deploy the merged code to different environments.
d) If in certain circumstances, two Pull Requests are created simultaneously, the approver, will only be able to merge the branches in the same order pull requests were initiated.
For more information, please refer to the link