Intuition The ONE core idea
CI/CD is a tireless robot that re-checks your code every time you change it, then packages a safe copy so a broken line never reaches your users. Everything on the parent page is just the vocabulary for what the robot does and how fast it can do it .
Before you can read the parent note, you must own every word and symbol it throws at you. This page builds them all from nothing, in an order where each brick rests on the one before it. Nothing here contradicts the parent — it goes underneath it.
Everything happens on a timeline of one code change : from "you typed it" on the left to "users have it" on the right. Keep this line in your head — every term below is a label on a point of this line .
Intuition Why a left-to-right line?
The parent's magic phrase is "shift left" — catch problems earlier , i.e. further to the left on this line, because a bug found near "you typed it" costs almost nothing, while a bug found near "users have it" is a disaster. You cannot understand "shift left" until you can see the line it shifts along.
Definition Repository, commit, branch, push
A repository (repo) = the folder holding all your project's files plus its full history . Picture a filing cabinet that never forgets any older version.
A commit = one saved snapshot of the repo at a moment, with a message. Picture a photograph of the whole project.
A branch = a named line of commits you can grow separately, like a side-lane, so your half-finished work doesn't disturb everyone else.
A push = uploading your local commits to the shared copy everyone sees.
These four are the inputs to a pipeline. The robot does nothing until one of them happens.
Why does the topic need them? Because CI is triggered by events on these atoms — a push, or a request to merge one branch into another. If these are fuzzy for you, first read Version Control & Git Branching ; the whole pipeline is meaningless without them.
Definition Pull request (PR) and trigger
A pull request (PR) = a formal proposal: "please merge this branch into the main one." Picture knocking on a door and asking "may my changes come in?"
A trigger = the cause that starts the robot. The parent lists these: push, pull_request, tag, schedule.
Intuition Why a trigger at all?
A robot that runs constantly wastes money; a robot that runs never is useless. So we tie it to events that matter — the exact moments new code appears. Look at the figure: each colored dot on the branch is an event, and each event fires an arrow into the pipeline.
Definition Merge and integrate
Merge = combining two branches' changes into one. Picture two rivers joining.
Integrate = the result of merging everyone's work into one shared, working whole.
The "I" in CI is Integration, not "install". This is the parent's first big mistake-warning. "Continuous" means do the merge often, in tiny amounts — so two rivers joining is a trickle, not a flood.
Intuition Why "often" beats "once at the end"
If 20 people each merge once at the end, all 20 conflicts hit at once — a flood. If each merges tiny changes many times a day, every conflict is a trickle you fix in seconds. This is the actual point of CI ; the tests are just the safety check on each trickle.
Definition Build, compile, dependency
Dependency = outside code your project needs (a library someone else wrote). Picture ingredients you buy rather than grow.
Compile = translate human-written source code into a form the machine runs. (Some languages skip this; they interpret instead.)
Build = the whole "make it runnable" step: fetch dependencies + compile + assemble.
Why does the topic need this word first in the pipeline? The parent's rule: "can't test what won't build." A cake you can't bake can't be tasted. So Build sits before Test on the timeline.
Definition Lint / static analysis
Lint = a tool that reads your code for style problems and obvious bugs without running it . "Static" = while standing still (not executing).
Intuition Why lint goes so early
Running code is slow and can crash; reading it is near-instant. If a 2-second read already proves the code is broken, why pay for a 5-minute test run? Cheapest check first — that is the "fail fast" ordering of the whole pipeline.
Definition The test ladder
Unit test = check one small piece in isolation (one function). Cheap, fast, many.
Integration test = check that pieces work together .
End-to-end (e2e) test = act like a real user clicking through the whole app. Slow, few.
The pipeline runs them cheap → expensive , so the fastest failure is found first. For the full breakdown see Automated Testing — Unit vs Integration vs E2E .
Definition Artifact, package, deploy
Artifact = a file a stage produces and saves for later — a compiled binary, a Docker image, a coverage report. Picture a labelled box coming off the assembly line.
Package = the act of making that box (bundling everything into one shippable unit).
Deploy = putting the box where it runs — staging (a rehearsal environment) or production (real users).
Why only package after tests pass? Boxing up broken code just wastes glue. So Package sits to the right of Test on the line.
Definition Runner, container, image
Runner (agent) = the actual machine (a VM or container) that executes the jobs.
Image = a frozen, complete snapshot of an operating system + tools. Picture a factory-sealed, identical starter kit.
Container = a running copy of an image — a clean, isolated box.
Intuition Why containers matter for "red in CI, green locally"
The runner boots a fresh, clean container every time — no hidden tools your laptop secretly has. That's why code can pass on your machine but fail in CI. The fix in the parent (docker run the same image locally) simply copies the runner's clean box onto your laptop . Deep-dive: Docker & Containerization .
Common mistake Watch the word "Job" flip meaning
In GitHub , a Job is a whole runner's worth of work and Steps are the commands inside it. In GitLab , a Stage is the phase and Jobs are the parallel units inside it. Same nesting, different labels for the middle layer — the figure above lines them up so you never mix them.
YAML = a plain-text file format for configuration; indentation shows nesting. It lives in your repo so the pipeline is versioned like code ("config-as-code").
DAG (Directed Acyclic Graph) = a picture of jobs as boxes with arrows meaning "must finish before"; acyclic = no arrow-loop back to yourself (or the pipeline would wait forever). GitLab's needs: builds this graph so independent jobs don't wait needlessly. Related idea: Infrastructure as Code .
Now the parent's little formula. It uses four symbols:
⌈ ⋅ ⌉ and not plain division?
With n = 8 jobs and m = 3 runners: two full waves handle 6 jobs, and the last 2 jobs still need a third wave even though it's half-empty. 8/3 = 2.67 but you cannot run 0.67 of a wave — so you round up to 3. That is exactly what the ceiling symbol encodes, and why it's the right tool here (not floor, not plain division).
Worked example Reading the speedup cap
With n = 8 , m = 4 : S = 8/ ⌈ 8/4 ⌉ = 8/2 = 4 × . Push to m = 8 : S = 8/1 = 8 × — the ceiling. Beyond m = n , extra runners sit idle. This capped speedup is Amdahl's Law in disguise, and the whole philosophy of catching bugs early is DevOps Principles & Shift-Left .
Continuous Delivery and Deployment
DAG needs and parallelism
Timing math n t m ceiling
Read it bottom-up: the atoms (repo, build, test, container) feed CI ; CI plus packaging feeds CD ; the math explains how fast the middle can go; together they are the pipeline.
Cover the right side and answer out loud. If any fails, revisit its section above.
I can explain what a commit, branch, and push are A commit is a snapshot; a branch is a separate line of commits; a push uploads local commits to the shared repo.
I know what triggers a pipeline An event — push, pull_request, tag, or schedule.
The "I" in CI stands for Integration (merging work together often), not "install".
Why Build comes before Test You can't test what won't build — no runnable form, nothing to check.
Why Lint runs before Test Reading code (static, no execution) is near-instant, so the cheapest check fails fastest.
The three test kinds, cheap to expensive Unit, then Integration, then End-to-end.
What an artifact is A saved file a stage produces (binary, Docker image, report) for later stages.
Difference between an image and a container An image is a frozen snapshot; a container is a running copy of that image.
The GitHub nesting order Workflow ➜ Job ➜ Step.
The GitLab nesting order Pipeline ➜ Stage ➜ Job.
What YAML gives us that clicking buttons doesn't Config-as-code: the pipeline is versioned, reviewable, and reproducible in the repo.
What a DAG is and why acyclic A graph of jobs with "must finish before" arrows; acyclic means no loops, or the pipeline would wait forever.
What ⌈ n / m ⌉ means and why up Round n/m up to the next whole number, because a half-full final wave still costs a full wave of time.
The parallel time and speedup formulas T p a r a l l e l = t ⌈ n / m ⌉ and S = n / ⌈ n / m ⌉ , capped at m = n .