Bitzu

AZ-400 ยท Testing strategy for pipelines

Quality and release gates in Azure Pipelines

Branch policies vs pipeline gates, Azure Pipelines gates (Azure Monitor alerts, REST API, work item query), manual validation, approvals, security and governance checks, quality gates for coverage and scanning.

Key points

  • Gates (classic release) poll Azure Monitor alerts, REST API, Azure Function, work item query, Azure Policy compliance.
  • All must pass in one sampling interval before the timeout.
  • YAML: approvals and checks on a resource (environment, service connection): branch control, required template, business hours, Invoke REST API.
  • ManualValidation: pauses a run in an agentless job.
  • Branch policies guard code; gates and checks guard deployment.

Source: https://learn.microsoft.com/en-us/azure/devops/pipelines/release/approvals/gates?view=azure-devops

Practice questions

Single choice

Which built-in deployment gate checks whether alert rules are currently firing for an application?

  1. Query work items
  2. Query Azure Monitor alerts
  3. Invoke Azure Function
  4. Check Azure Policy compliance
Show answer

Answer: B. Query Azure Monitor alerts

Query Azure Monitor alerts succeeds only when no observed alert rules are active. Query work items counts work items, Invoke Azure Function runs your code, and Check Azure Policy compliance evaluates resource compliance.

Select all that apply

Which statements about how deployment gates are evaluated are correct?

  1. Gates are re-evaluated at each sampling interval.
  2. Every gate must succeed in the same interval for the stage to proceed.
  3. If the timeout is reached before all gates succeed together, the deployment is rejected.
  4. A gate that succeeded once stays passed even if later samples fail.
  5. For pre-deployment conditions, gates always run before manual approvals by default.
Show answer

Answer: A. Gates are re-evaluated at each sampling interval., B. Every gate must succeed in the same interval for the stage to proceed., C. If the timeout is reached before all gates succeed together, the deployment is rejected.

Gates are polled repeatedly, all must pass in one sampling interval, and hitting the timeout rejects the deployment. A gate that passed earlier does not stay passed, and the pre-deployment default is approvals first, then gates.

True or false

True or false: approvals and checks on an environment are defined in the pipeline YAML, so anyone who can edit the YAML can remove them.

Show answer

Answer: False

False. Approvals and checks are configured by resource administrators in the web interface, not in the YAML, so pipeline authors cannot edit them.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More AZ-400 topics in this module