200-901 Application Deployment and Security Practice Question
A team uses a Jenkins declarative pipeline to deploy a microservice. The pipeline includes stages: Checkout, Build Docker Image, Run Unit Tests, Push to Registry, Deploy to Staging, and Deploy to Production. Which stage should run immediately after 'Build Docker Image' to ensure code quality before the image is pushed?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Run Unit Tests
After building the Docker image, the next logical step is to run unit tests to verify code quality before pushing the image to a registry.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Deploy to Staging
Why it's wrong here
Staging deployment occurs after the image is pushed to the registry, so placing it directly after Build Docker Image bypasses unit testing and leaves nothing in the registry to pull. It would be correct later in the pipeline, once tests pass and the image is published, as the pre-production verification step.
- ✓
Run Unit Tests
Why this is correct
Running unit tests directly after building the image validates code quality before the artefact is pushed to the registry, satisfying the stem's requirement to catch defects prior to publication. Deploying or pushing first would propagate unverified code, defeating the quality gate.
- ✗
Deploy to Production
Why it's wrong here
Deploying to production before unit tests run ships unverified code and skips the quality gate entirely. It is tempting as the pipeline's final goal, but production deployment belongs after staging validation; the stage that must follow Build Docker Image is Run Unit Tests, which validates the image before it is pushed.
- ✗
Push to Registry
Why it's wrong here
Pushing to the registry immediately after building publishes an image whose code has not been tested, so a failing build reaches the registry. It is tempting because the registry must eventually receive the image, but Run Unit Tests must execute first to gate that push on code quality.
Go deeper
Related to this question
About these practice questions
This 200-901 question is part of Courseiva's 975-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.