200-901 Application Deployment and Security Practice Question
A CI/CD pipeline uses GitLab CI. The pipeline must build a Docker image and then run security scans on the image before pushing. Which GitLab CI keyword allows defining a sequence of jobs that must run in order?
⚠ Common exam trap
The 200-901 exam often tests confusion between keywords that control *when* a job runs (`only`, `rules`, `except`) versus *in what order* jobs run (`stages`, `needs`).
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
✓
stages
In GitLab CI, the `stages` keyword defines an ordered list of stages, and jobs assigned to those stages run in sequence — all jobs in stage 1 must complete before any job in stage 2 begins. This is exactly how you enforce that a build job finishes before security scan jobs run, and scans finish before the push job.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
before_script
Why it's wrong here
before_script defines commands run before each job's own script, not an ordered sequence of separate jobs. It is tempting because it genuinely sequences setup steps within a single job, which would suffice if the build and scans ran as stages inside one job rather than as distinct jobs.
- ✓
stages
Why this is correct
The stages keyword groups jobs into named, ordered phases; GitLab CI runs each stage sequentially, so a build stage completes before a scan stage begins. This enforces the required build-then-scan order before pushing the image.
- ✗
only
Why it's wrong here
The only keyword restricts when a job is added to the pipeline, based on branches, tags or changes; it cannot express that one job must complete before another. It is tempting because it controls pipeline composition, but ordering comes from stages or needs.
- ✗
image
Why it's wrong here
The image keyword names the container image a job executes in; it defines no ordering between jobs. It is tempting because image is essential to any Docker-building job, but sequencing requires stages or needs, which declare execution order rather than runtime environment.
Go deeper
Related to this question
About these practice questions
One of 975 original 200-901 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Cisco exam blueprint
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.