You need to ensure that only specific branches can trigger a release to production in Azure Pipelines. What should you configure?
In Azure Pipelines, a release pipeline's artifact trigger can be configured with a branch filter to specify which branches of the source repository are allowed to initiate a release. When you add a branch filter under the artifact trigger of the release pipeline, only builds from those branches (or builds that match the filter) will cause a release to be created, directly meeting the requirement to restrict which branches can trigger a release.
Why this answer
A branch filter on the release pipeline's artifact trigger allows you to specify which branches of the source artifact (e.g., a build pipeline) should automatically trigger a release. By configuring this filter to only include branches like 'main' or 'release/*', you ensure that only builds from those specific branches can initiate a release to production, providing precise control over deployment triggers.
Exam trap
The trap here is confusing branch filters on build pipeline triggers (which control when code is built) with branch filters on release pipeline artifact triggers (which control when releases are created from those builds), leading candidates to incorrectly select Option D.
How to eliminate wrong answers
Option A is wrong because an approval gate requires a manager to approve the release after it is triggered, but it does not restrict which branches can trigger the release; any branch could still initiate the release, and the gate only adds a manual approval step. Option B is wrong because a deployment gate checks conditions (like source branch) at deployment time, but it does not prevent the release from being triggered; it only evaluates whether to proceed with the deployment after the release is already created. Option D is wrong because a branch filter on the build pipeline trigger controls which branches trigger a build, not which branches trigger a release; this would affect when code is compiled, not when a release is deployed to production.