az-400 Practice Question 1982

Exam: az-400
Domain: Develop a security and compliance plan
Topic: Implement security in the pipeline
Difficulty: medium
When integrating SonarQube quality gates into your Azure DevOps pipeline to enforce code quality and security standards, which of the following actions should you perform to ensure that the pipeline only proceeds to the next stage if the code meets the predefined quality criteria?

Answer Options

A
Run unit tests on the code before the quality gate check.
B
Configure the pipeline to skip the next phase if the SonarQube analysis fails.
C
Notify the development team via email if the SonarQube analysis fails.
D
Allow the pipeline to continue regardless of the SonarQube analysis results.

Correct Answer

B: Configure the pipeline to skip the next phase if the SonarQube analysis fails.

Explanation

The correct answer is B because it ensures that the pipeline will only proceed if the code meets the predefined quality criteria. Option A is incorrect as it does not address the quality gate functionality. Option C is incorrect as it suggests a manual intervention which is not ideal for an automated pipeline. Option D is incorrect as it implies that the pipeline will always proceed regardless of the quality checks.

Related Practice Questions