Deployment1 / 5
A DevOps team is implementing a CI/CD pipeline for a cloud application. The pipeline should automatically run unit tests, build a container image, push it to a registry, and deploy to a staging environment. Which of the following represents the correct order of pipeline stages?
CorrectNot quite
Alex
In containerized CI/CD pipelines, the fail-fast principle dictates running unit tests before building container images. Unit tests execute against source code in seconds, catching bugs before the resource-intensive container build step. If tests fail, the pipeline halts — no compute wasted on Docker builds, registry pushes, or deployments. After tests pass, the build stage creates the container image. The push stage uploads it to a registry (e.g., Docker Hub, ECR, ACR) where it is versioned and immutable. Finally, deploy pulls the verified image to the target environment. Why not the others? Build-Deploy-Test-Push deploys untested code. Push-Test-Build-Deploy pushes before building — logically impossible. Deploy-Test-Push-Build reverses the entire flow. Ref: CompTIA Cloud+ CV0-004 Obj 2.4; NIST SP 800-190 S4.2 (container image assurance).
Sourcedocs.cloud.google.com
Create a free account to keep asking Alex — no credit card required.
Question 1 of 5
Get started free