Microsoft DevOps Engineer Expert AZ-400 Practice Question

A build pipeline that runs on Microsoft-hosted Linux agents restores about 300 MB of Maven dependencies from the public Maven Central repository on every execution. The team complains about long queue-to-publish times and the organization wants to reduce egress traffic charges. You must implement a change that

  • shortens the pipeline run time,
  • minimizes repeated network downloads,
  • automatically refreshes the stored files when the project's pom.xml changes,
  • requires no manual maintenance of the agent machines. Which action should you take?
  • Add a Cache@2 task that stores the local Maven repository using a key based on the SHA-1 hash of pom.xml.

  • Publish the .m2 directory as a pipeline artifact in the first stage and download it in later stages of every run.

  • Switch the pipeline to use the ubuntu-latest image, which includes more pre-installed build tools and caches.

  • Commit the entire .m2 directory to the Git repository using Git LFS so agents can clone the dependencies.

Microsoft DevOps Engineer Expert AZ-400
Design and implement build and release pipelines
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot