AZ-400 exam dumps

AZ-400 practice question 160 of 306

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

AZ-400 Question 160

Select 2

You manage an Azure DevOps multi-stage YAML pipeline to deploy three microservices: Microservice A, Microservice B, and Microservice C. Microservice A must be updated before Microservice B, and Microservice B must be updated before Microservice C. You need to ensure that the deployment pipeline always respects this order. Which two actions should you take to reliably enforce the required deployment sequence?

  1. A

    Configure each stage's 'dependsOn' property to reference the previous microservice's stage

  2. B

    Use a manual intervention task to approve deployments for each microservice individually

  3. C

    Set up a separate release pipeline for each microservice without inter-pipeline dependencies

  4. D

    Define a custom condition that validates the successful completion of the dependent microservice in each stage

Show answer and explanation

Correct answers: A, D

Explanation

To ensure dependencies are deployed in the correct order, define stage dependencies and custom conditions in your Azure DevOps YAML pipeline. The 'dependsOn' attribute is documented in the Microsoft Azure DevOps documentation (https://docs.microsoft.com/azure/devops/pipelines/process/stages?view=azure-devops), and custom conditions (https://docs.microsoft.com/azure/devops/pipelines/process/conditions?view=azure-devops) can further ensure the sequence. Both approaches work together to make pipeline execution more reliable and to prevent microservice B and C from deploying before their dependencies are satisfied.

  • A. Correct.

    Correct. In Azure Pipelines YAML, you can define dependencies between stages by using the 'dependsOn' attribute. This enforces that B won't start until A completes, and C won't start until B completes.

  • B. Incorrect.

    Incorrect. While manual intervention tasks can pause the pipeline, they do not inherently enforce a strict sequence or dependency ordering. They rely on a person to trigger the next step, which is less reliable for automated ordering.

  • C. Incorrect.

    Incorrect. Having separate release pipelines without referencing each other does not guarantee dependency order. Without explicit dependencies, microservices can be triggered independently in any order.

  • D. Correct.

    Correct. Custom conditions in a given stage can ensure that the stage only proceeds if the preceding microservice deployment succeeded. This is another reliable method to enforce an ordered deployment workflow.

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