Understanding Azure DevOps.
Tags: azure, devops, tutorial, git
Published: 2020-12-09 21:30:26

<span class="r"></span>

What do you think when you listen to the word **DevOps**? Do you understand the perfect meaning of this word or is it still confused? If you are in the IT field, then you probably come across this word very often. Did you google it before, and didn’t understand? Are you interested to know? Let’s jump on to the definition of DevOps:

> DevOps is a set of practices that combines software development and IT operations. It aims to shorten the systems development life cycle and provide continuous delivery with high software quality.

This is the Wikipedia definition for DevOps. To simply deliver and make you understand this, it is a culture, which has been used in the industry for a long time now. But it is likely to be trending now. Developers team and the Operations team get to work together to decrease time to make a system/product etc. They get to collaborate and work as a team so that the work will be faster and efficient.

So, now I will talk about **Azure DevOps** and what it offers.

It is a Microsoft product that provides us various capabilities for the user:

1.  Version Control
2.  Reporting
3.  Requirements management
4.  Project management
5.  Automated builds
6.  Lab management
7.  Testing and release management

I will discuss mainly the Version Control and the Continuous Integration in Azure DevOps.

# Prerequisites

*   Microsoft Azure account.
*   Any Version Control System like Git, TFVC (Team Foundation Version Control) by Microsoft.

Here, Git is an Open Source Distributed Version Control system whereas TFVC is a Centralised Version Control System.

# Making our first Azure DevOps Project

1.  Visit the website [https://dev.azure.com/<your-azure-id>/](https://dev.azure.com/seema1711/)

This contains information about all your projects for Azure DevOps.

![Azure DevOps website](https://miro.medium.com/max/60/1*35VLpCG_z-sq4QwRueTwig.png?q=20)

<noscript><img alt="Azure DevOps website" class="s t u bw ai" src="https://miro.medium.com/max/2724/1*35VLpCG_z-sq4QwRueTwig.png" width="1362" height="726" srcSet="https://miro.medium.com/max/552/1*35VLpCG_z-sq4QwRueTwig.png 276w, https://miro.medium.com/max/1104/1*35VLpCG_z-sq4QwRueTwig.png 552w, https://miro.medium.com/max/1280/1*35VLpCG_z-sq4QwRueTwig.png 640w, https://miro.medium.com/max/1400/1*35VLpCG_z-sq4QwRueTwig.png 700w" sizes="700px"/></noscript>

2\. Now, to create a new project go to the **New Project** tab.

![Image for post](https://miro.medium.com/max/60/1*QDnJMJ8yRxGSoOfAdNm47w.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/308/1*QDnJMJ8yRxGSoOfAdNm47w.png" width="154" height="54"/></noscript>

![Image for post](https://miro.medium.com/max/60/1*eSYQGJcztwOGpjf35V9RDg.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/2730/1*eSYQGJcztwOGpjf35V9RDg.png" width="1365" height="623" srcSet="https://miro.medium.com/max/552/1*eSYQGJcztwOGpjf35V9RDg.png 276w, https://miro.medium.com/max/1104/1*eSYQGJcztwOGpjf35V9RDg.png 552w, https://miro.medium.com/max/1280/1*eSYQGJcztwOGpjf35V9RDg.png 640w, https://miro.medium.com/max/1400/1*eSYQGJcztwOGpjf35V9RDg.png 700w" sizes="700px"/></noscript>

3\. After clicking on the New Project, the portal will look like this. Here, add your project name, I have named it “Demo project for Azure DevOps” and you can give it a description about what this project does. Then there is an option for visibility if you want to give access to anyone then you can choose public else choose private, it will only be accessed by the ones whom will you give them access to.

Also, if you choose the Advanced option below, you will get the following options:

![Image for post](https://miro.medium.com/max/60/1*7GGIYwtWWQpop4CsBmFz3A.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/1274/1*7GGIYwtWWQpop4CsBmFz3A.png" width="637" height="595" srcSet="https://miro.medium.com/max/552/1*7GGIYwtWWQpop4CsBmFz3A.png 276w, https://miro.medium.com/max/1104/1*7GGIYwtWWQpop4CsBmFz3A.png 552w, https://miro.medium.com/max/1274/1*7GGIYwtWWQpop4CsBmFz3A.png 637w" sizes="637px"/></noscript>

You can choose which version control you want to use, I will go with Git for now. And then click on create.

This screen will show up.

![Image for post](https://miro.medium.com/max/60/1*78-1_Rc1RWdd5J5JQLb-vA.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/2732/1*78-1_Rc1RWdd5J5JQLb-vA.png" width="1366" height="624" srcSet="https://miro.medium.com/max/552/1*78-1_Rc1RWdd5J5JQLb-vA.png 276w, https://miro.medium.com/max/1104/1*78-1_Rc1RWdd5J5JQLb-vA.png 552w, https://miro.medium.com/max/1280/1*78-1_Rc1RWdd5J5JQLb-vA.png 640w, https://miro.medium.com/max/1400/1*78-1_Rc1RWdd5J5JQLb-vA.png 700w" sizes="700px"/></noscript>

Hurray!! We have created our first Azure DevOps project.

Now, if you see on the left side of the screen, there are multiple options, what are they? Let’s find out!

# Components of Azure DevOps

![Components of Azure DevOps](https://miro.medium.com/max/60/1*2TDXj841-sUdqCFJM0if5g.png?q=20)

<noscript><img alt="Components of Azure DevOps" class="s t u bw ai" src="https://miro.medium.com/max/522/1*2TDXj841-sUdqCFJM0if5g.png" width="261" height="250"/></noscript>

*   **Azure Boards:** If you are working on a team or various teams are working on a single project, then they need to communicate better to provide good results to the product. Azure boards are a work tracking system like dashboards. They provide you great custom reports and also deals with the backlogs.
*   **Azure Repos:** It is the collection of all your repositories. You can push, pull, and also commit your changes to your repositories. It provides you unlimited Cloud hosted private repositories.
*   **Azure Pipelines:** It is a CI/CD i.e. Continuous Integration/Continuous Delivery, testing, and deployment system that can connect to any Git repository.
*   **Azure Test Plans:** Your code/data might be not correct, that’s why we have test plans in Azure DevOps. It is a solution for tests and capturing data about defects.
*   **Azure Artifacts:** It is a hosting facility for Maven, npm, and NuGet packages.Azure enables you to create, host, and also share packages among your team. Artifacts in Azure ensure your pipelines have fully integrated package management.

Now that you have a basic understanding of the components of Azure DevOps and also you’ve created a project. Let’s move further to add our project to the Azure Repos.

# Adding project to Azure DevOps Repos

If you go to Repos and then select Files, you could see a screen like this.

![Image for post](https://miro.medium.com/max/60/1*rpTq-5x98a_f5SATX2PEPg.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/2732/1*rpTq-5x98a_f5SATX2PEPg.png" width="1366" height="623" srcSet="https://miro.medium.com/max/552/1*rpTq-5x98a_f5SATX2PEPg.png 276w, https://miro.medium.com/max/1104/1*rpTq-5x98a_f5SATX2PEPg.png 552w, https://miro.medium.com/max/1280/1*rpTq-5x98a_f5SATX2PEPg.png 640w, https://miro.medium.com/max/1400/1*rpTq-5x98a_f5SATX2PEPg.png 700w" sizes="700px"/></noscript>

Now, I will create a local folder in my Windows system, where I will add some of my previous projects.

I have created a folder named Demo for Azure DevOps in my laptop and stored some Python code. Here, I am using Git Bash.

1.  Initialize the Git repository using the command **“git init”**. It will create a .git file in your folder.

![Image for post](https://miro.medium.com/max/60/1*uV3vHxZzHOLUirguomQNqg.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/2342/1*uV3vHxZzHOLUirguomQNqg.png" width="1171" height="536" srcSet="https://miro.medium.com/max/552/1*uV3vHxZzHOLUirguomQNqg.png 276w, https://miro.medium.com/max/1104/1*uV3vHxZzHOLUirguomQNqg.png 552w, https://miro.medium.com/max/1280/1*uV3vHxZzHOLUirguomQNqg.png 640w, https://miro.medium.com/max/1400/1*uV3vHxZzHOLUirguomQNqg.png 700w" sizes="700px"/></noscript>

2\. After initializing the git repo, add the files to the repository. Using the command **“git add .”**. It will add all the files, including **.gitignore** file if you have one.

3\. Then commit the files with the message **“Added python files”** or whatever you would like to add.

4\. Now, that you have added all the files in your repo locally, it’s time for you to upload or add the files to the remote repository in Azure DevOps.

Use these commands: You don’t have to worry about the commands, you just have to copy and paste them from here.

![Image for post](https://miro.medium.com/max/60/1*rImKbTDqcybo2WechqAYDA.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/764/1*rImKbTDqcybo2WechqAYDA.png" width="382" height="104" srcSet="https://miro.medium.com/max/552/1*rImKbTDqcybo2WechqAYDA.png 276w, https://miro.medium.com/max/764/1*rImKbTDqcybo2WechqAYDA.png 382w" sizes="382px"/></noscript>

5\. After pasting the commands in your git bash or Command line, it will look like this.

![Image for post](https://miro.medium.com/max/60/1*s6c1rcjq_TmAPW1faVC1BA.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/2700/1*s6c1rcjq_TmAPW1faVC1BA.png" width="1350" height="526" srcSet="https://miro.medium.com/max/552/1*s6c1rcjq_TmAPW1faVC1BA.png 276w, https://miro.medium.com/max/1104/1*s6c1rcjq_TmAPW1faVC1BA.png 552w, https://miro.medium.com/max/1280/1*s6c1rcjq_TmAPW1faVC1BA.png 640w, https://miro.medium.com/max/1400/1*s6c1rcjq_TmAPW1faVC1BA.png 700w" sizes="700px"/></noscript>

This means you have added all your files to the remote repo.

6\. To confirm the changes, refresh the **dev.azure.com/<your-user-name>.**

![Image for post](https://miro.medium.com/max/60/1*Ogmj9GBjw6QtE2Zjcse9zQ.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/2204/1*Ogmj9GBjw6QtE2Zjcse9zQ.png" width="1102" height="427" srcSet="https://miro.medium.com/max/552/1*Ogmj9GBjw6QtE2Zjcse9zQ.png 276w, https://miro.medium.com/max/1104/1*Ogmj9GBjw6QtE2Zjcse9zQ.png 552w, https://miro.medium.com/max/1280/1*Ogmj9GBjw6QtE2Zjcse9zQ.png 640w, https://miro.medium.com/max/1400/1*Ogmj9GBjw6QtE2Zjcse9zQ.png 700w" sizes="700px"/></noscript>

You can see the files I have added.

# Setting up Continuous Integration using Git

1.  Go to the git repository.
2.  Now, go to Pipelines. And select **New Pipeline.**

![Image for post](https://miro.medium.com/max/60/1*TeSJlBtQBY1tgqc_6H3JBA.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/2732/1*TeSJlBtQBY1tgqc_6H3JBA.png" width="1366" height="443" srcSet="https://miro.medium.com/max/552/1*TeSJlBtQBY1tgqc_6H3JBA.png 276w, https://miro.medium.com/max/1104/1*TeSJlBtQBY1tgqc_6H3JBA.png 552w, https://miro.medium.com/max/1280/1*TeSJlBtQBY1tgqc_6H3JBA.png 640w, https://miro.medium.com/max/1400/1*TeSJlBtQBY1tgqc_6H3JBA.png 700w" sizes="700px"/></noscript>

3\. Choose the Classic editor.

![Image for post](https://miro.medium.com/max/54/1*Fs7lLSRbJbNMa12B0A7t2g.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/888/1*Fs7lLSRbJbNMa12B0A7t2g.png" width="444" height="501" srcSet="https://miro.medium.com/max/552/1*Fs7lLSRbJbNMa12B0A7t2g.png 276w, https://miro.medium.com/max/888/1*Fs7lLSRbJbNMa12B0A7t2g.png 444w" sizes="444px"/></noscript>

Since this is an Azure git repo, so I will select that.

![Image for post](https://miro.medium.com/max/56/1*f92hVH7e3_LjErLD8Lcfvg.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/1032/1*f92hVH7e3_LjErLD8Lcfvg.png" width="516" height="561" srcSet="https://miro.medium.com/max/552/1*f92hVH7e3_LjErLD8Lcfvg.png 276w, https://miro.medium.com/max/1032/1*f92hVH7e3_LjErLD8Lcfvg.png 516w" sizes="516px"/></noscript>

4\. Then click on continue, on the next page you will find the option to select template, since I have python files, so I will choose Python package.

![Image for post](https://miro.medium.com/max/60/1*LQ8PSYg-upKaFQJKmaoYYw.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/1314/1*LQ8PSYg-upKaFQJKmaoYYw.png" width="657" height="477" srcSet="https://miro.medium.com/max/552/1*LQ8PSYg-upKaFQJKmaoYYw.png 276w, https://miro.medium.com/max/1104/1*LQ8PSYg-upKaFQJKmaoYYw.png 552w, https://miro.medium.com/max/1280/1*LQ8PSYg-upKaFQJKmaoYYw.png 640w, https://miro.medium.com/max/1314/1*LQ8PSYg-upKaFQJKmaoYYw.png 657w" sizes="657px"/></noscript>

5\. Now, go to triggers and check the **“Enable Continuous Integration”** option. Also, check the “Batch changes” option, so that if you have multiple commits, then it will merge all the commits into a single one.

![Image for post](https://miro.medium.com/max/60/1*LBzjLqtvAhIt9vqMy4fb-w.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/1074/1*LBzjLqtvAhIt9vqMy4fb-w.png" width="537" height="363" srcSet="https://miro.medium.com/max/552/1*LBzjLqtvAhIt9vqMy4fb-w.png 276w, https://miro.medium.com/max/1074/1*LBzjLqtvAhIt9vqMy4fb-w.png 537w" sizes="537px"/></noscript>

6\. Finally select, Save, and queue and then select save.

![Image for post](https://miro.medium.com/max/60/1*5hVreri8gGCUN8AiKHkebA.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/314/1*5hVreri8gGCUN8AiKHkebA.png" width="157" height="47"/></noscript>

7\. Now again go to repos. And make some changes to any file. Like I have added a new comment in the file i.e. Azure Pipeline. Then commit the changes.

![Image for post](https://miro.medium.com/max/60/1*IxbNo0VE_-2Wn_a8p6ixIg.png?q=20)

<noscript><img alt="Image for post" class="s t u bw ai" src="https://miro.medium.com/max/594/1*IxbNo0VE_-2Wn_a8p6ixIg.png" width="297" height="120" srcSet="https://miro.medium.com/max/552/1*IxbNo0VE_-2Wn_a8p6ixIg.png 276w, https://miro.medium.com/max/594/1*IxbNo0VE_-2Wn_a8p6ixIg.png 297w" sizes="297px"/></noscript>

8\. Finally, go to pipelines and you will see that the pipelines are running automatically.

That’s all from my side. Keep learning!