Sign in
track

CI/CD

Pipelines, builds, deploys. From git push to production with no manual steps.

Basics

Hands-on in GitLab

Ten hands-on steps in GitLab: from your first job to building in a container, caching, secrets, and a manual deploy.

01 theory
Your own GitLab project: a copy of the course repo

We set up the repository where you'll run pipelines: clone the course project, switch origin to your own, and make the first push.

12 min · easy
02 theory
First job: three lines and a green checkmark

We write a minimal .gitlab-ci.yml, push it, and watch GitLab spin up a container and run the command on its own.

10 min · easy
03 theory
Stages: work order and stopping on failure

We split the pipeline into build and test, see how stages run in order, and why a failed build cancels everything after it.

12 min · easy
04 theory
Artifacts: passing files between stages

Why a file from build isn't visible in test, and how artifacts fix that. We build a public folder and pick it up in the next stage.

12 min · easy
05 theory
Deploy: your site on the internet at its own address

We add a deploy stage and a pages job. GitLab publishes the public folder, and the site opens at a link without a single manual step.

12 min · easy
06 theory
Variables: pipeline context and secrets

Built-in CI_ variables, your own values in .gitlab-ci.yml, and masked secrets in project settings. Plus a colon that breaks YAML.

14 min · easy
07 theory
A real build: your own image and npm in the pipeline

We swap echo for a real bundler: a node image, npm ci, esbuild, and dist in the artifacts. We dig into where a job's environment comes from.

14 min · easy
08 theory
Cache: how it differs from artifacts

We speed up dependency installs between runs. A key by the lock file's hash, and why caching node_modules for npm ci makes no sense.

13 min · medium
09 theory
rules: what runs and what waits for a button

We split deploys by branch, put a manual gate in front of prod, and work out why rules replaced only/except.

13 min · medium
10 theory
Antipatterns: five ways to make a pipeline useless

A green job that lies, a password in the log, latest instead of a version, a monolithic job, and a dead only. Each one shown on an example.

15 min · medium

Going deeper