Back to sections

CI/CD Quiz

Test what you actually know about CI/CD. Free sample questions below, from easy to hard, with instant explanations.

easy

1. What does CD stand for in CI/CD?

Configuration Definition
Continuous Delivery/DeploymentCorrect
Container Deployment
Code Distribution

CD covers what happens after code passes CI: Continuous Delivery/Deployment automates getting that already-tested code out to staging or production quickly, rather than being about containers, distribution, or config files.

medium

2. What is the purpose of automated testing in CI?

To catch bugs early before they reach productionCorrect
To slow down deployments
To replace developers
To increase code size

Running automated tests on every single change means a bug gets flagged the moment it's introduced, while it's still fresh and easy to trace, rather than being discovered days or weeks later once it's already reached production and affected real users.

hard

3. What is trunk-based development?

Long-lived feature branches
Working on tree diagrams
Avoiding version control
A branching model where developers integrate small changes frequently to mainCorrect

Trunk-based development means everyone merges small changes into the main branch constantly instead of working for weeks on a separate feature branch. Frequent small merges are much easier to integrate cleanly than one giant merge at the end, which is exactly the conflict-heavy scenario long-lived branches create.

easy

4. Which file defines a pipeline in GitLab CI?

.gitlab-ci.ymlCorrect
pipeline.yml
ci-config.yml
gitlab.yml

GitLab looks for one specific file at the root of your repo, .gitlab-ci.yml, and that's what tells its Runners which jobs and stages to execute. Other names like pipeline.yml or gitlab.yml simply won't be recognized.

medium

5. What is blue-green deployment?

Running two identical production environments for zero-downtime deploysCorrect
Color-coded logs
A testing framework
A monitoring dashboard

Blue-green deployment keeps two full, identical production environments running side by side, one live (blue) and one idle with the new version (green). Switching traffic from blue to green happens instantly, so there's no downtime, and if anything goes wrong you can just switch back to blue just as fast.

hard

6. Why avoid latest tag in production deployments?

Non-deterministic: image content can change without version bump → breaks reproducibility & rollbackCorrect
GitHub blocks it
It’s slower to pull
Increases container size

The latest tag doesn't point to one fixed image, it can silently point to a different image tomorrow with no version number changing. That means two deployments that both say 'latest' might actually be running completely different code, which makes it impossible to reliably reproduce a build or roll back to what you had before.

easy

7. In a CI pipeline, what is a "build matrix" used for?

Visualizing which pipeline stages depend on each other
Running the same job multiple times across a combination of variables, like different OS versions or language runtimes, in parallelCorrect
Encrypting secrets before they're injected into a job
Storing build artifacts in a shared cache between pipeline runs

A build matrix lets you define one job template and have the CI system automatically run it once for every combination of specified variables, for instance testing against three Node versions on both Ubuntu and Windows. This catches environment-specific compatibility issues without hand-writing a near-identical job for every combination. It's about multiplying test coverage across environments, not about caching artifacts or handling secrets.

medium

8. A team wants to merge and deploy a new checkout flow to production every day like normal, but only wants real customers to see it once it's demoed to stakeholders next Monday. What technique lets them deploy the code now while controlling exactly when users are exposed to it?

Deploy to production but block all inbound traffic to the load balancer until Monday
Wrap the new checkout flow in a feature flag that stays off in production until it's toggled on for users after the demoCorrect
Tag the commit but wait to run the deployment pipeline until Monday
Hold the merge in a long-lived feature branch until Monday, then merge and deploy everything at once

A feature flag decouples DEPLOYING code, getting it running in production, from RELEASING it, making it visible or active for users, so the team can ship early and flip the flag on demand without a fresh deploy. Holding a long-lived feature branch reintroduces the merge-conflict risk that CI/CD is meant to avoid, and blocking all inbound traffic would take down the whole site, not just hide one feature. This decoupling is one of the core reasons feature flags are considered a deployment risk-reduction tool.

hard

9. What is the purpose of pipeline parallelization?

Increasing resource usage
Running independent jobs simultaneously to reduce build timeCorrect
Slowing down builds
Sequential execution

If your test suite has jobs that don't depend on each other, like linting and unit tests, there's no reason to make them wait in line. Pipeline parallelization runs those independent jobs on multiple runners at the same time, so the whole pipeline finishes in the time of the slowest single job instead of the sum of all of them.

easy

10. What is the main benefit of CI/CD?

Cheaper servers
Reduced coding
Better graphics
Faster and more reliable software deliveryCorrect

By automating the repetitive parts (building, testing, releasing), CI/CD removes a lot of room for human error and shortens the time between writing code and finding out if it works, which is why teams end up shipping faster and with more confidence.

Ready for the real thing?

Take the full timed CI/CD quiz and see your score.

    Welcome to OpsQuiz!

    Real scenario-based DevOps questions, hands-on practice, and clear explanations for every answer.