4.5.10 · D1Software Engineering

Foundations — CI - CD — pipeline stages, GitHub Actions - GitLab CI concepts

2,136 words10 min readBack to topic

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.


1. The picture the whole topic lives in

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.


2. The atoms of software — before any pipeline exists

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.


3. The trigger and the pull request


4. Merge, integrate, and the word "Continuous"

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.


5. Build, compile, dependency — turning text into a running thing

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.


6. Lint and static analysis — reading without running


7. Test — and why there are three kinds

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.


8. Artifact, package, deploy — the delivery half

Why only package after tests pass? Boxing up broken code just wastes glue. So Package sits to the right of Test on the line.


9. Runner, container, image — the machine that does the work


10. The three-layer hierarchy — Workflow / Job / Step


11. YAML, DAG, and the math symbols

Now the parent's little formula. It uses four symbols:


12. How these foundations feed the topic

Repo commit branch push

Trigger and Pull Request

Continuous Integration

Build compile dependency

Lint static analysis

Automated tests

Artifact and Package

Runner container image

Continuous Delivery and Deployment

YAML config as code

DAG needs and parallelism

Timing math n t m ceiling

CI CD Pipeline

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.


Equipment checklist

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 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
and , capped at .