Preface – This post is part of the SAP on Azure series.
Table of Contents
Introduction
Azure DevOps pipeline configuration starts with Azure Repository and Branches. We firstly create an Azure DevOps Repo, and then create our branches within it. Then only we can configure Azure Pipelines. In this article we will explore both Azure Repository and Branches.
Azure DevOps Repository
Azure DevOps Repository is a space where all the branches are created. We create separate Repos for individual projects.
Steps to Add Repository
- Create a new Repository (You need Authorization to do so)
- Assign a name to your Repository e.g. “Test Repo”, and choose Type as Git:
You can find your Repo, like mentioned below:
Azure Git Branches
When a new Repository is created, it just has master branch. As per the requirement of your project, you can create multiple branches. A simple flow of code includes three branches i.e. Develop, Release and Production. The Develop is the one where all the development is done, Release is where all the testing is performed by the testers and the Production is the one that has stable code, available for end users.
Adding Branches
According to your use case you can create Develop, Release and Production branch with certain policies (The branch will be on top of Master)
Enter required details:
Add in Favorite:
Adding Policies in DevOps branches
To add or change branch policies, you need to click on the three dots next to the branch and then click on “Branch policies”.
Following are some ideal policies:
1. Require a minimum number of reviewers
2. Mark “Check for linked work items” as “Required”
3. Mark “Check for comment resolution” as “Required”
4. Set “Limit merge types” as below:
We can make more changes as per the project requirement. We can read more about policies here.
5. Now add reviewers
And then add these:
0 Comments