Table of Contents
Question
You have a project in Azure DevOps named Project1. Project1 contains a build pipeline named Pipe1 that builds an application named App1. You have an agent pool named Pool1 that contains a Windows Server 2022-based self-hosted agent. Pipe1 uses Pool1. You plan to implement another project named Project2. Project2 will have a build pipeline named Pipe2 that builds an application named App2. App1 and App2 have conflicting dependencies. You need to minimize the possibility that the two build pipelines will conflict with each other. The solution must minimize infrastructure costs. What should you do?
A. Add another self-hosted agent.
B. Add a Docker Compose task to the build pipelines.
C. Change the self-hosted agent to use Red Hat Enterprise Linux (RHEL) 9.
D. Create two container jobs.
Answer
D. Create two container jobs.
Explanation
The answer is D. Create two container jobs.
By creating two separate container jobs, each build pipeline will run isolated in its own container, thus ensuring that the dependencies of App1 and App2 do not interfere with each other. Containers encapsulate an application with its environment, including its dependencies, into one standalone unit. This isolation allows you to simultaneously run applications with conflicting dependencies since they are no longer sharing the same environment.
Here’s why the other options are not advisable:
A. Add another self-hosted agent: This can potentially avoid conflict, but it would not minimize infrastructure costs as requested in the problem, as it necessitates additional hardware resource and maintenance.
B. Add a Docker Compose task to the build pipelines: Docker Compose is used to define and run multi-container Docker applications, but it doesn’t necessarily isolate dependencies of different applications running on the same agent.
C. Change the self-hosted agent to use Red Hat Enterprise Linux (RHEL) 9: Simply changing the operating system of the agent does not solve the problem of conflicting dependencies. Even on a different OS, if both applications are being built on a single agent, their dependencies may still conflict.
Reference
- Azure Pipelines Agents – Azure Pipelines | Microsoft Learn
- Run a self-hosted agent in Docker – Azure Pipelines | Microsoft Learn
- Deploy an Azure Pipelines agent on Windows – Azure Pipelines | Microsoft Learn
- Container Jobs in Azure Pipelines and TFS – Azure Pipelines | Microsoft Learn
- python – Azure Pipeline fails with conflicting dependencies – Stack Overflow
- npm – How to handle conflicting peer dependencies? – Stack Overflow
- Manage dependencies in Azure YAML Devops Pipelines – Stack Overflow
- Jobs in Azure Pipelines and TFS – Azure Pipelines | Microsoft Learn
- Jobs in Azure Container Apps (preview) | Microsoft Learn
Designing and Implementing Microsoft DevOps Solutions AZ-400 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Designing and Implementing Microsoft DevOps Solutions AZ-400 exam and earn Designing and Implementing Microsoft DevOps Solutions AZ-400 certification.