Azure DevOps is a powerful platform for modern development workflows, offering seamless collaboration and automation. Chapter 6 focuses on Azure Artifacts MCQ questions and answers, covering universal packages, feeds, managing dependencies with tools like NuGet, npm, and Maven, artifact retention policies, and their integration with build pipelines. Designed for developers and DevOps engineers, these MCQs will help you master the efficient publishing, consuming, and managing of Azure Artifacts for streamlined project delivery.
MCQs
1. Understanding Universal Packages and Feeds
What is the primary purpose of Azure Artifacts? a) Hosting websites b) Managing and sharing packages c) Automating virtual machines d) Performing security scans
Universal packages in Azure Artifacts are used to: a) Store code repositories b) Share and distribute custom artifacts c) Deploy virtual machines d) Host container images
Which format is used for universal packages in Azure Artifacts? a) ZIP b) TAR c) JSON d) Any format
How are feeds organized in Azure Artifacts? a) By branches b) By permissions c) By projects or teams d) By virtual machines
What is a key advantage of feeds in Azure Artifacts? a) Simplified artifact storage and access control b) Automated deployment of virtual machines c) Lower storage costs d) Prebuilt AI models
What command-line tool is used to push universal packages to Azure Artifacts? a) azdevops-cli b) az artifacts universal c) npm install d) maven deploy
2. Managing Dependencies with NuGet, npm, and Maven
What is the primary function of NuGet in Azure Artifacts? a) Manage .NET dependencies b) Handle Node.js packages c) Deploy SQL databases d) Build Docker images
Which file is essential for managing npm dependencies? a) package.json b) npm.config c) config.json d) dependencies.json
How does Maven help manage dependencies in Java projects? a) By using a pom.xml file b) Through a build.json file c) Using a MavenConfig.xml d) By connecting to JAR repositories directly
Which Azure DevOps tool integrates NuGet, npm, and Maven? a) Azure Repos b) Azure Artifacts c) Azure Pipelines d) Azure Boards
What command is used to authenticate npm with an Azure Artifacts feed? a) npm login b) npm auth c) npm install-token d) az artifacts auth
Maven artifacts in Azure are stored using which type of feed? a) Universal feed b) Maven-specific feed c) Node.js feed d) Java repository
3. Publishing and Consuming Artifacts
How can artifacts be published to an Azure DevOps feed? a) Using the “Push to Feed” option in Azure Pipelines b) By manually copying files c) Using Azure SQL Database d) Through Azure Monitor
Consuming artifacts in a pipeline requires: a) Specifying the feed in the pipeline settings b) Deploying artifacts to the release pipeline c) Adding a VM in Azure DevOps d) Connecting to Azure Storage
What does a package version in Azure Artifacts signify? a) The number of deployments b) A specific release of the package c) The artifact’s storage location d) The type of artifact
What is required to consume an artifact from an external feed? a) Authentication and permissions b) A dedicated virtual network c) Continuous deployment pipeline d) An Azure Logic App
Which task in Azure Pipelines is used to download artifacts? a) Download Package Task b) Fetch Artifact Task c) Download Build Artifacts Task d) Artifact Fetcher
What is the advantage of publishing artifacts in Azure Pipelines? a) Ensures version control and reusability b) Reduces Azure subscription costs c) Optimizes virtual machine usage d) Enhances application uptime
4. Artifact Retention Policies
What is an artifact retention policy? a) A policy to automate package updates b) Rules for maintaining and deleting artifacts c) A backup plan for Azure storage d) A workflow for building artifacts
How does retention policy improve artifact management? a) By reducing storage usage and maintaining cleanliness b) By automating deployment c) By scaling virtual machines d) By monitoring pipeline performance
What happens when an artifact exceeds its retention period? a) It is deleted from the feed b) It is archived automatically c) It is moved to cold storage d) It generates a notification
Where can retention policies be configured in Azure DevOps? a) Feed settings b) Virtual Network settings c) Azure Monitor d) API Management
Which Azure DevOps component can enforce retention policies? a) Pipelines b) Artifacts c) Boards d) Test Plans
Retention policies in Azure Artifacts are based on: a) Time-based and usage-based rules b) Storage location c) Pricing tiers d) Application types
5. Integration with Build Pipelines
How do Azure Artifacts integrate with build pipelines? a) By providing package storage and distribution b) By deploying virtual machines c) By hosting web applications d) By executing test plans
Which build pipeline task is used to publish a NuGet package to Azure Artifacts? a) Publish Package Task b) NuGet Push Task c) Artifact Distribution Task d) Build Deployment Task
How can Azure Pipelines consume a package from Azure Artifacts? a) Add the feed as a package source b) Use an external repository c) Deploy a virtual machine d) Connect to Azure Boards
What benefit does integrating Artifacts with Pipelines provide? a) Streamlined CI/CD workflows b) Reduced virtual machine costs c) Improved testing capabilities d) Increased Azure subscription limits
What type of authentication is required for pipelines to access Azure Artifacts? a) Personal Access Tokens (PAT) b) SFTP credentials c) SSH keys d) OAuth tokens
Which file is essential for specifying package feeds in pipelines? a) nuget.config or settings.xml b) config.json or feeds.yaml c) artifacts.config or appsettings.json d) deploy.json or app.config
Answers
QNo
Answer (Option with the text)
1
b) Managing and sharing packages
2
b) Share and distribute custom artifacts
3
d) Any format
4
c) By projects or teams
5
a) Simplified artifact storage and access control
6
b) az artifacts universal
7
a) Manage .NET dependencies
8
a) package.json
9
a) By using a pom.xml file
10
b) Azure Artifacts
11
a) npm login
12
b) Maven-specific feed
13
a) Using the “Push to Feed” option in Azure Pipelines
14
a) Specifying the feed in the pipeline settings
15
b) A specific release of the package
16
a) Authentication and permissions
17
c) Download Build Artifacts Task
18
a) Ensures version control and reusability
19
b) Rules for maintaining and deleting artifacts
20
a) By reducing storage usage and maintaining cleanliness