AZ-400 Question 99
Select 2Your organization develops internal .NET libraries that must be securely shared across multiple teams via Azure DevOps pipelines. At the same time, you have a subset of these libraries that the open-source community on GitHub is actively contributing to. You want to manage package distribution in a way that ensures private feeds remain secure and open-source libraries are publicly and easily accessible. Which two approaches should you recommend?
- A
Use Azure Artifacts for private .NET libraries to provide role-based access and seamless integration with Azure DevOps.
- B
Use Azure Container Registry to store and distribute .NET assemblies as container images.
- C
Use GitHub Packages registry to publish your open-source .NET packages and allow external contributors to collaborate.
- D
Implement a standalone self-hosted repository manager (e.g., Artifactory) for both internal and external feeds.
Show answer and explanation
Correct answers: A, C
Explanation
Azure Artifacts is a centralized, fully managed service within Azure DevOps that can host private package feeds (such as NuGet, npm, Maven, and Python). GitHub Packages registry is designed to work seamlessly with GitHub repositories for public and open-source distribution. By combining both, you can effectively secure internal libraries in Azure Artifacts while publicly publishing open-source libraries on GitHub Packages for community collaboration. Refer to Microsoft Docs (https://docs.microsoft.com/azure/devops/artifacts/overview and https://docs.github.com/packages) for detailed guidance on setting up these services.
- A. Correct.
Option 1 is correct. Azure Artifacts is well-suited for hosting private .NET libraries. It supports role-based access control, integrates natively with Azure DevOps, and offers package feeds (e.g., NuGet) for internal consumption. This directly addresses the need for a secure, private feed for multiple teams.
- B. Incorrect.
Option 2 is incorrect. Azure Container Registry is primarily used to store and manage container images (e.g., Docker images). While you can technically store images containing your .NET assemblies, it is not optimized for package-based distribution in a typical .NET environment.
- C. Correct.
Option 3 is correct. GitHub Packages registry allows you to store and publish open-source .NET packages directly within GitHub, enabling external collaborators to access and contribute easily. This approach satisfies the requirement of open-source sharing on GitHub.
- D. Incorrect.
Option 4 is incorrect. While a self-hosted solution like Artifactory or Nexus can handle both internal and external packages, it introduces additional infrastructure overhead and complexity. Since you already use Azure DevOps and GitHub, leveraging Azure Artifacts for private feeds and GitHub Packages for open-source sharing is more efficient and integrated.