Continuous Integration Flashcards
7 cards from real AZ-400 practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Continuous Integration flashcards as text
What is the purpose of 'code coverage' metrics collected during a CI pipeline?
Answer: To report what percentage of source code is exercised by automated tests
Code coverage metrics indicate the proportion of production code executed by automated tests, helping teams identify untested code paths.
A pipeline needs to pass a secret API key to a build script securely. What is the correct approach in Azure Pipelines?
Answer: Store the key as a secret pipeline variable and reference it with $(VariableName)
Secret pipeline variables are masked in logs and encrypted at rest; they are referenced the same way as regular variables but never exposed in output.
Which Azure DevOps feature allows you to group related pipelines and share variables, service connections, and agent pools across them?
Answer: Pipeline libraries and variable groups
Variable groups in the Pipelines Library let you define shared variables and link Azure Key Vault secrets that can be referenced by multiple pipelines.
What does 'shift-left testing' mean in the context of a CI/CD pipeline?
Answer: Performing tests earlier in the development lifecycle, closer to code authoring
Shift-left testing moves quality checks (unit tests, static analysis, security scans) earlier in the pipeline so defects are caught before later, more expensive stages.
In Azure Pipelines, which condition expression causes a step to run only when the previous step fails?
Answer: condition: failed()
The failed() condition expression makes a step execute only when one or more preceding steps have failed, useful for cleanup or notification steps.
A team wants to block merges to 'main' unless two approvers have reviewed the PR AND the CI build passes. Which combination of Azure DevOps branch policies achieves this?
Answer: Minimum reviewer count policy + build validation policy
Combining the minimum number of reviewers policy with the build validation policy enforces both human approval and automated build success as merge prerequisites.
What is the benefit of using 'pipeline artifacts' (PublishPipelineArtifact) over 'build artifacts' (PublishBuildArtifacts) in Azure Pipelines?
Answer: Pipeline artifacts use Azure Blob Storage and are faster to upload and download
PublishPipelineArtifact leverages Azure Blob Storage with optimized chunked transfers, providing significantly faster upload and download speeds than the legacy build artifact mechanism.