Courseiva
Design and implement build and release pipelinesmediumMultiple ChoiceObjective-mapped

AZ-400 Practice Question: Design and implement build and release pipelines

You need to implement a build retention policy that automatically deletes old builds after 30 days, but keeps the latest 5 builds regardless of age. Which configuration should you use?

⚠ Common exam trap

It's easy for candidates to confuse the 'Minimum number of builds to keep' with a maximum limit, or they misremember the exact field names (e.g., 'Number of runs to keep' or 'Number of builds to retain'), leading them to select options that do not exist in the Azure DevOps UI.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Set 'Days to keep builds' to 30 and 'Minimum number of builds to keep' to 5

In Azure Pipelines, the 'Days to keep builds' and 'Minimum number of builds to keep' settings work together to enforce a retention policy that deletes builds older than 30 days while ensuring that at least the latest 5 builds are retained, even if they exceed the age limit. This configuration directly matches the requirement to delete old builds after 30 days but keep the latest 5 builds regardless of age.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Set 'Number of days to keep runs' to 30 and 'Number of runs to keep' to 5

    Why it's wrong here

    Azure Pipelines retention is configured via 'Days to keep builds' and 'Minimum number of builds to keep' — there's no 'Days to keep runs' / 'Number of runs to keep' setting.

  • Set 'Maximum retention policy' to 30 days and 'Number of builds to retain' to 5

    Why it's wrong here

    No such setting; retention policy is per pipeline.

  • Set 'Days to keep builds' to 30 and 'Minimum number of builds to keep' to 5

    Why this is correct

    Deletes builds older than 30 days but keeps at least 5.

  • Set 'Number of days to keep artifacts' to 30 and 'Number of artifacts to keep' to 5

    Why it's wrong here

    Applies to artifacts, not builds.

About these practice questions

Courseiva writes every AZ-400 question from scratch — 823 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.