AZ-400 exam dumps

AZ-400 practice question 200 of 306

Designing and Implementing Microsoft DevOps Solutions. Professional level, Microsoft. Free question with the correct answer and a full explanation.

AZ-400 Question 200

Single answer

You are responsible for an Azure DevOps pipeline that builds and deploys a containerized application to an AKS cluster. The pipeline relies on a shared YAML template stored in a separate repository. Recently, changes in that external repository caused your build process to break. You want to ensure your pipeline remains stable when the external repository updates. Which action should you take to maintain a reliable reference to the shared template?

  1. A

    Reference the template using the main branch to always fetch the latest changes.

  2. B

    Use a YAML template reference that specifies an explicit commit or stable tag of the external repository.

  3. C

    Clone the external repository locally and manually copy the template files into your pipeline each time.

  4. D

    Configure pipeline variables for the repository and template paths, updated on every commit to the external repository.

Show answer and explanation

Correct answer: B

Explanation

Maintaining stable references to shared templates is a key best practice in pipeline management. Microsoft recommends using pinned commits or tags to ensure reproducible builds, as described in the Azure DevOps documentation on templates. Referencing a specific commit or tag in an external repository preserves reliability and prevents unexpected pipeline failures caused by incompatible updates.

  • A. Incorrect.

    Option 1: Referencing the main branch ensures you always get the latest changes, but it can break your pipeline if incompatible or breaking changes are introduced in the external repository. This does not provide a stable reference.

  • B. Correct.

    Option 2: Specifying an explicit commit or a stable tag of the external repository ensures your pipeline references a known working version of the template. This approach provides reproducible builds and is recommended for maintaining pipeline stability. (Correct)

  • C. Incorrect.

    Option 3: Manually copying the template content each time is error-prone and can lead to configuration drift if updates are not consistently synchronized. It also duplicates effort and may cause missed updates.

  • D. Incorrect.

    Option 4: Using pipeline variables to manage the path still relies on you updating those variables after each external repository change. This adds overhead and doesn�t guarantee that your pipeline references a stable version of the template.

Timed practice exam

Take a AZ-400 practice test under exam conditions

70 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam