Describe the typical CI pipeline sequence from push to deploy
This tests stage ordering and failure handling. A strong answer lists build, test, and deploy stages; notes intra-stage parallelism and inter-stage sequencing; and mentions early termination on failure.
WHAT THIS TESTS: Whether the candidate grasps the difference between sequential stages and parallel jobs, what triggers a pipeline, how runners execute work, and the failure semantics that determine if a pipeline proceeds or halts. Interviewers want to hear that CI is not just a shell script but a structured execution model with specific ordering guarantees.
A GOOD ANSWER COVERS: First, the trigger: a developer pushes a commit to main, which creates a pipeline instance. Second, the build stage: a compile job runs on a runner to produce artifacts. Third, the test stage: multiple jobs such as test1 and test2 run in parallel across available runners, and all must pass. Fourth, the deploy stage: a deploy-to-production job releases the artifact, but only executes if the prior stage succeeded completely. Fifth, the failure rule: if any job in a stage fails, the next stage is usually not executed and the pipeline ends early. The candidate should also mention that pipelines are defined in a .gitlab-ci.yml file and that jobs run independently.
COMMON WRONG ANSWERS: Describing the pipeline as one long sequential script where every step waits for the previous step on the same machine. Claiming that a failed test job blocks other test jobs in the same stage, which is incorrect because jobs within a stage run concurrently and independently. Omitting runners entirely, as if the Git server itself compiles and tests the code. Saying deployment happens automatically on every push without mentioning stage gating or success requirements. Confusing merge request pipelines with basic branch pipelines.
LIKELY FOLLOW-UPS: How would you speed up a slow pipeline? The expected direction is using the needs keyword to create dependencies between jobs rather than waiting for entire stages. What happens when you have a mono-repo? The interviewer may probe parent-child pipelines to break down complexity. How do you handle a flaky test? They want to hear about retry logic, parallel job isolation, or stage rules. What is the difference between a merge request pipeline and a basic pipeline? The answer should note that MR pipelines run only for merge requests and can use merged results.
ONE CONCRETE EXAMPLE: A minimal three-stage pipeline defined in .gitlab-ci.yml starts with a build stage containing a compile job. When the commit hits main, a runner picks up the compile job and builds the project. Upon success, the pipeline enters the test stage, where test1 and test2 spin up simultaneously on separate runners to lint and unit-test the code. If both finish successfully, the deploy stage begins and the deploy-to-production job pushes the artifact live. If test2 fails, the deploy stage is skipped and the pipeline ends early, preventing broken code from reaching production.
Read the original → docs.gitlab.com
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.