1. What is Azure DevOps?
Answer: Azure DevOps is a cloud-based service provided by Microsoft that offers a complete set of tools to manage the software development lifecycle. It includes services like Azure Repos, Azure Pipelines, Azure Boards, Azure Test Plans, and Azure Artifacts.
2. What are the key services provided by Azure DevOps?
Answer:
Azure Repos: Source code management (SCM) with Git or Team Foundation Version Control (TFVC).
Azure Pipelines: CI/CD service for building, testing, and deploying code.
Azure Boards: Agile planning tools, including Kanban boards, backlogs, and sprints.
Azure Test Plans: Manual and exploratory testing tools.
Azure Artifacts: Package management for Maven, npm, NuGet, and more.
3. Explain the difference between Azure DevOps Services and Azure DevOps Server.
Answer: Azure DevOps Services is a cloud-based offering available on Microsoft’s Azure cloud platform, while Azure DevOps Server is an on-premises version that integrates with your existing IDE or editor, enabling your cross-functional team to work effectively on projects of all sizes.
4. How does Azure Pipelines work?
Answer: Azure Pipelines provides build and release services to support continuous integration (CI) and continuous delivery (CD). It automates building, testing, and deploying code to multiple environments using YAML or the classic editor.
5. What is YAML in Azure Pipelines?
Answer: YAML (Yet Another Markup Language) is a human-readable data serialization standard that can be used to define the build, release, and deployment pipeline as code. YAML files are used to define the steps in Azure Pipelines in a structured and straightforward way.
6. What is a Build Agent in Azure DevOps?
Answer: A Build Agent is a computing infrastructure in Azure Pipelines where your builds and releases are executed. Azure DevOps offers both Microsoft-hosted and self-hosted agents.
7. What is the purpose of Azure Repos?
Answer: Azure Repos is a set of version control tools that you can use to manage your code. It provides Git repositories or Team Foundation Version Control (TFVC) for source control, allowing teams to collaborate on code development.
8. How does branching work in Azure Repos?
Answer: Branching in Azure Repos works similarly to Git branching. It allows you to create separate branches for different features, bug fixes, or releases. Branches can be merged back into the main branch once the development is complete and tested.
9. What is a Pull Request in Azure Repos?
Answer: A pull request is a process for a developer to notify team members that they have completed a feature or bug fix and that it is ready to be merged into the main branch. It also provides an opportunity for code review before integration.
10. What is Continuous Integration (CI) in Azure DevOps?
Answer: Continuous Integration (CI) is a practice where developers integrate code into a shared repository several times a day. Each integration is verified by an automated build and automated tests to detect integration errors as quickly as possible.
11. What is Continuous Deployment (CD) in Azure DevOps?
Answer: Continuous Deployment (CD) is an extension of Continuous Integration where the code changes that pass all the stages of the pipeline are automatically deployed to the production environment.
12. What is Azure Boards and how is it used?
Answer: Azure Boards provides a suite of tools to help teams plan, track, and discuss work across the entire software development lifecycle. It supports work item tracking, Kanban boards, task boards, backlogs, sprints, and queries.
13. What are Test Plans in Azure DevOps?
Answer: Azure Test Plans provide a set of tools to manage your testing efforts. It allows you to create, manage, and run manual tests and manage test cases. It also supports exploratory testing to find bugs without a predefined set of test cases.
14. What is Azure Artifacts?
Answer: Azure Artifacts is a service that helps you manage and share packages such as NuGet, npm, and Maven. It provides a central location for your team to manage all its packages.
15. Explain Azure DevOps CI/CD pipeline in a real-time scenario.
Answer: In a real-time scenario, the CI/CD pipeline might include the following stages:
- Code is pushed to a branch in Azure Repos.
- The CI pipeline is triggered to build the code and run automated tests.
- If the build and tests are successful, the code is deployed to a staging environment.
- The CD pipeline automatically deploys the code to production if all tests pass in the staging environment.
16. What is the difference between a build pipeline and a release pipeline in Azure DevOps?
Answer:
Build Pipeline: Used to compile and test the code. It involves tasks such as compiling source code, running unit tests, and producing artifacts.
Release Pipeline: Used to deploy artifacts to various environments like development, staging, and production. It typically involves tasks like deploying to web servers, databases, and executing post-deployment scripts.
17. How can you secure your pipelines in Azure DevOps?
Answer: Security in Azure DevOps pipelines can be ensured by:
- Using service connections with least privilege access.
- Securing secrets and tokens using Azure Key Vault.
- Implementing approval gates for critical stages.
- Enforcing branch policies and access controls on repositories.
18. What is the purpose of Azure DevTest Labs?
Answer: Azure DevTest Labs is a service that allows developers and testers to quickly create environments in Azure while minimizing waste and controlling cost. It provides features like reusable templates, automation, and integrated DevOps toolchain support.
19. What is Infrastructure as Code (IaC) and how does Azure DevOps support it?
Answer: Infrastructure as Code (IaC) is the process of managing and provisioning computing infrastructure through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools. Azure DevOps supports IaC through Azure Resource Manager (ARM) templates, Terraform, and Ansible integration.
20. How do you manage dependencies in Azure Pipelines?
Answer: Dependencies in Azure Pipelines can be managed using Azure Artifacts, where you can store, share, and version your dependencies (e.g., NuGet, npm, Maven packages). You can also define dependencies in the YAML pipeline by specifying required stages, jobs, or steps.