Azure DevOps Interview Questions and Answers

Azure DevOps Interview Questions and Answers

Prepare and ace your Azure DevOps interview

What is Azure DevOps?

Azure DevOps Services is a service by Microsoft which helps organizations to fast pace and plan, develop, manage, monitor and deploy projects effectively and efficiently. It brings developers, managers, contributors and other stakeholders on a common platform to complete the project. It has two variations

  1. Azure DevOps is available as a cloud (Azure) hosted SaaS service, and provides provides a scalable, reliable, and globally available hosted service.

  2. Azure DevOps Server is an on-premises offering. Use it when you want your data to stay within your network or when you want access to SQL Server reporting services that integrate with Azure DevOps Server data and tools.

To make a choice, see the Differences between Azure DevOps Services and Azure DevOps Server.

Azure DevOps Services consist of following services and you can choose any one of them as per your need-

  • Azure Repos

  • Azure Boards

  • Azure Pipelines

  • Azure Test Plans

  • Azure Artifacts

Screenshot of services on the left navigational menu.

What is Azure Repos?

Azure Repos is a version control tool to help keep track of your code and documents over the period of time. Version control is must to have for any project irrespective of the project team size. In day to day work developer/team member makes changes to the code frequently, Azure Repos can help in managing those changes and keep the things organized. There are two types of the version control provided by the Azure Repos:

  1. Git - Git is a decentralized version control system

  2. Team foundation version control (TFVC) - TFVC is a centralized version control system

Azure Repos, Git files page

What is Azure Boards?

Azure Boards provides an agile dashboard which helps you to plan, track and manage the project for day to day activities using the agile methodologies. It has native support for Scrum and Kanban. Azure boards consist of rich UI based dashboard, where you can track user stories, issues, bugs, and extract reports in quickest way possible.

Azure Boards provides agile tools to plan and track work.

Azure Boards backlogs

What is Azure Pipelines?

Azure pipelines provides continuous integration and continuous delivery (CI/CD) of the codebase by building and deploying the build output to target environment. It can work for any project irrespective of the technology and type of the project.

Azure Pipelines helps in supporting build, test and release automation. Whenever a team member checks in code changes, automatically build can be run. A build pipeline can include instructions to run tests after the build runs. Release pipelines manage deployment of software builds to staging or production environments.

Azure Pipelines landing page

What is Azure Test Plans?

Azure Test Plans is a service for quality assurance. An Azure Test Plan provides a rich and powerful tool for the test management solution system. It helps in creating test plan, creating test cases, run manual test cases and generate reports for test execution result.

Test Plans

What is Azure Artifacts?

Azure Artifacts provides the capabilities to publish and consume different types of packages to feeds and public registries such as NuGet.org and npmjs.com. Azure Artifacts is used along with Azure Pipelines to deploy packages and publish build artifacts. Azure artifacts is also used to integrate files between azure pipeline stages to build, test or deploy application(s).

Azure DevOps Interview Questions

Here are some of the Azure DevOps questions and answers to help to prepare for your upcoming interviews.

1. Assume that you are an Azure DevOps engineer and working for "Cloud Authority" organization. Organization is starting a new project which belongs to financial domain and tagged as confidential project. You have to choose DevOps solution from the Azure platform. Which one you will choose and why?

I will choose Azure DevOps server in this particular scenario instead of the Azure DevOps services. The reason being Azure DevOps server is on-premises offering by the Microsoft Azure. Hence the data of the project will remain inside the organization network itself, as this is the confidential project hence better to keep everything within the on-premises network.

2. Assume that you are a Azure DevOps engineer and working for "Cloud Authority" organization. Your team is working on project since a year now and is using Azure DevOps server. Now as organization’s strategic decision, project has to moved from azure DevOps server to azure DevOps service. First of all is it possible to move the existing items from azure DevOps server to azure DevOps service. If yes then how?

Yes it is absolutely possible to move the existing project from Azure DevOps server to azure DevOps service. There are three approaches for the migration:

Approach 1: Manual approach, where we can copy the source code and work items manually from the on-prem DevOps server to the cloud based Azure DevOps service.

Approach 2: Microsoft Azure has provided the dedicated migration tool for Azure DevOps migration. This is one of the best approaches. We can use data migration tool to do the migration.

Approach 3: Use the public API-based tools for higher fidelity migration.

3. What are the different ways to connect to a project in Azure DevOps?

We can connect to Azure DevOps project by using the following ways:

  1. Access Azure DevOps through web portal

  2. Integrating with Visual Studio or Team Explorer

  3. Eclipse/Team Explorer Everywhere Integration

  4. Android Studio with the Azure DevOps Services Plug-in for Android Studio

  5. IntelliJ with the Azure DevOps Services Plug-in for IntelliJ

  6. Visual Studio Code

4. Assume that you are Technical Architect and working for "Cloud Authority" organization. You have on-boarded a new developer in the team. How would you ensure that whatever changes he will do, must get reviewed and approved before merging the code in the master repo?

Block the direct commit to the master/main branch. For merging the changes, developer will be asked to create their own feature branch on which he/she is working. Once they are done with their changes, they can then raise the pull request for merging the changes into the master/main branch. Any senior team member can review the code and approve it before merging in master branch.

5. What are the prerequisites for Azure pipeline to setup continuous integration and continous delivery?

  • You need a GitHub account, where you can create a repository.

  • You need at least one Azure DevOps organization. It is free and if you don’t have one, you can create it anytime.

  • You need administrator role for the Azure DevOps project that you want to use.

  • You should have privileges to run pipelines on Microsoft-hosted agents. It could be either paid parallel jobs or you can request a free tier.

6. How would you create Azure pipeline using Azure CLI ?

  1. Fork the following repository into your GitHub account: https://github.com/MicrosoftDocs/pipelines-java

  2. Clone the repo

  3. Go to cloned directory

  4. Create pipeline using command az pipelines create –name “JavaPipeline.CI

  5. It may ask for authentication enter your username and password

  6. It will ask to provide the service connection name, enter it. (service connection needed for the azure pipeline and git hub repo communication.

  7. It will ask you to enter the pipeline template name among the list. (for example node.js, ASP.NET, maven etc)

  8. It will create the YAML and commit in repo.

  9. Azure DevOps will automatically start a pipeline run. Wait for the run to finish.

7. Can you describe Azure CLI command to run the pipeline?

az pipelines run [–branch]
[–commit-id]
[–folder-path]
[–id]
[–name]
[–open]
[–org]
[–project]
[–variables]

8. What is the Azure CLI command to update the pipeline ?

az pipelines update [–branch]
[–description]
[–id]
[–name]
[–new-folder-path]
[–new-name]
[–org]
[–project]
[–queue-id]
[–yaml-path]

9. What is the Azure CLI command to view the pipeline details?

az pipelines show [–folder-path]
[–id]
[–name]
[–open]
[–org]
[–project]

10. What is an organization in the Azure DevOps?

An organization in Azure DevOps is a by which you can organize and connect groups of related projects. Examples of this could be various departments within the company like sales, finance. We can also choose one organization for your entire company, or multiple organizations based on business units.

11. How can you setup the notification in for work items, code, review , Pull request and build in Azure DevOps, so that team member can take corresponding action accordingly?

Email notification can be set for work items, PR and other azure DevOps related activities. For setting up the email notification we need to follow below mentioned steps:

Sign in to your organization (dev.azure.com{yourorganization}).
Go to Project settings > Notifications.
Select New subscription.
Select the type of activity you want your team to be notified of.
Provide a description to help you identify the subscription later.
Choose which team members should receive a notification:
Choose whether you want to receive notifications about activity in all projects or only a specific project.
Optionally, configure additional filter criteria.
Select Finish to save the new subscription.

12. What is the use of Azure Pipeline agent?

In azure pipeline to build the code and to do deployment you needcompute infrastructure, this computation power is provided by the agent. Hence to run the pipeline you need to have minimum one agent available. You many need to increase the number of agents based as the load increases. Agent is computing infrastructure with agent software installed on it.

13. What are different Azure Pipelines agents?

  1. Microsoft-hosted agents: Agents hosted in the cloud by Microsoft

  2. Self-hosted agents: Agents hosted by you in your on-premise environment

14. What are Microsoft-hosted agents in Azure pipeline?

When you run your azure pipeline the job gets executed. Every job will run on the agent (i.e. the compute infrastructure). Microsoft itself provide the agents which is the virtual machine installed with agent software. If you opt for choosing the agent as Microsoft-hosted agents then everything will be taken care by the Microsoft from assigning the resource and installing the software and maintaining updates.

15. What is self-hosted agent in Azure pipeline?

Self-hosted agent is the agent which you set up and manage on your own to run jobs. You choose to opt for self-hosted agents in Azure Pipelines when you want more control to install dependent software needed for your builds and deployments. Also, machine-level caches and configuration persist from run to run, which can boost speed.

16. What do you mean by Parallel Jobs?

Number of jobs which you can run at the same time in your azure organization is termed as parallel jobs. If your azure organization is defined as single parallel job, it means you can run a single job at a time. When you have two or more jobs to run then only one will get executed and other has to wait for their turn which comes when first job completes. To run multiple jobs at the same time, you need multiple parallel jobs.

17. What do you mean by system Capabilities and user Capabilities in azure pipeline?

In the self-hosted agent, it has a set of capabilities which defines what can be done by capabilities. Capabilities are name-value pairs which can be either automatically discovered by the agent software, in which case they are called system capabilities, or those that you define, called user capabilities. Agent software detect system capabilities like name of the machine, operating system type, and other software installed on the machine including environment variables registered.

18. How you can view the list of agents using the Azure CLI command?

az pipelines agent list –pool-id
[–agent-name]
[–demands]
[–detect {false, true}]
[–include-assigned-request {false, true}]
[–include-capabilities {false, true}]
[–include-last-completed-request {false, true}]
[–org]
[–subscription]

19. How you can view the details of agents using the Azure CLI command?

az pipelines agent show –agent-id
–pool-id
[–detect {false, true}]
[–include-assigned-request {false, true}]
[–include-capabilities {false, true}]
[–include-last-completed-request {false, true}]
[–org]
[–subscription]

20. What are the different ways in which self hosted agent can be configured?

Self hosted agent can be configured in two ways either Agent as Service or Agent as interactive process with auto logon enabled.

21. What are the security risks associated with the agent as interactive process with auto logon enabled?

When we enable automatic logon or disable the screen saver, it will all make other users enable to walk up to the computer and use the account that automatically logs on. When we configure this way, we need to ensure that computer is physically protected.

22. Assume that you are a Azure DevOps engineer and working for "Cloud Authority" organization. Your project manager is forcing you to use Microsoft hosted agent for azure pipelines. However you think team should choose self hosted agent. What could be reason of your choice?

Microsoft hosted agent is the easy to set up but it has some limitation as well which are as follows:

Build duration: Assigning the build agent for the job can take up some time which can increase the build duration.

Disk space: In the hosted agents the amount of storage provided is fixed and sometime it won’t be good enough for large builds.

Interactivity: We can’t sign in to a hosted agent.

File shares: We can’t drop build artifacts to Universal Naming Convention (UNC) file shares.

Conclusion

Azure DevOps is a complete DevOps and CI/CD tool from Microsoft. This article gives you brief information about this tool, alongwith its components. We are sure that the questions and answers given here will help you prepare for the interview and also grab your next job.

In this blog we have tried to provide many real world scenario based interview questions and answers for experienced azure DevOps developer, engineer and architect. You can also refer to our other interview question posts.