cd ~/tutorials/cicd

CI/CD Tutorial

Learn CI/CD with GitLab from zero: what pipelines are for, stages and jobs, runners, rules, variables and secrets, Docker builds, tests, security scans, environments and keyless deploys to AWS.

13 lessons · 101 min

Start the course →

This course takes you from “what does CI/CD even mean?” to a production pipeline that builds, tests, scans and ships code without anyone copying files by hand. All along you automate Orbit, the small notes app from the Terraform Tutorial: a Node.js API, a static web front end and a container image that ends up on AWS.

Lesson 1 needs no tools at all. From lesson 2 you need a free GitLab.com account and Git on your machine. The pipelines run on GitLab’s hosted runners, so you do not have to install anything else until lesson 5, where you run your own runner with Docker.

Before you start: you should be comfortable with git commit and git push. Lessons 8 and 11 build container images, so the Docker Tutorial helps if docker build is new to you.

The examples target GitLab 19 (2026) and say which features need a paid tier, so you know what works on a Free namespace. The ideas carry over to GitHub Actions, Jenkins and every other CI system; only the YAML changes.

ls ./lessons

  1. Introduction to CI/CDWhat continuous integration, continuous delivery and continuous deployment really mean, the problems they fix, how a pipeline is put together, the words you will see every day and how GitLab CI/CD compares with GitHub Actions, Jenkins and Argo CD.beginner11 min readCompleted
  2. Getting Started with GitLab CI/CDCreate a GitLab project, push a .gitlab-ci.yml, watch your first pipeline run on a hosted runner, read job logs, fix a red pipeline, validate YAML with the pipeline editor and the glab CLI, and turn it into a real build and test pipeline for a Node.js API.beginner8 min readCompleted
  3. Pipeline Structure, Stages and JobsHow GitLab turns .gitlab-ci.yml into a pipeline: stages and their order, jobs and defaults, needs for a faster DAG, artifacts versus cache, extends and !reference to avoid repetition, allow_failure, retry, timeout and when a job runs.beginner8 min readCompleted
  4. Variables and Secrets in GitLab CIPredefined variables, variables in .gitlab-ci.yml, project and group CI/CD settings, masked, hidden and protected variables, file variables, precedence, environment-scoped values, the job token, and where secrets should really live, including external secret managers and GitLab Secrets Manager.intermediate8 min readCompleted
  5. GitLab RunnersWhat a runner is and how it picks up jobs, hosted runners on GitLab.com, instance, group and project runners, executors compared, installing your own runner with Docker, registering it with a glrt- authentication token, tags, config.toml, concurrency and keeping runners secure.intermediate8 min readCompleted
  6. Pipeline RulesDecide which jobs run and when with rules:if, rules:changes and rules:exists, branch, tag, merge request and schedule pipelines, workflow:rules to avoid duplicate pipelines, manual and delayed jobs, interruptible jobs and auto-cancel, and why only/except is legacy.intermediate7 min readCompleted
  7. Environments and DeploymentsTrack where code runs with GitLab environments, deployment history and rollbacks, dynamic review apps per merge request, stop jobs and auto_stop_in, dotenv reports for dynamic URLs, resource_group to serialise deploys, protected environments and deployment approvals.intermediate7 min readCompleted
  8. Building Docker Images in GitLab CIBuild and push container images from a pipeline: the GitLab container registry, Docker-in-Docker with TLS, tagging by commit and version, BuildKit layer caching through the registry, multi-arch images, daemonless alternatives after Kaniko was archived, services for integration tests and registry cleanup.intermediate7 min readCompleted
  9. Testing in GitLab CIRun the test pyramid in a pipeline: unit, integration with service containers and end-to-end tests, JUnit reports in merge requests, coverage percentage and line-by-line coverage, parallel and parallel:matrix jobs, test splitting, flaky test handling and keeping feedback under ten minutes.intermediate7 min readCompleted
  10. Security Scanning in GitLab CIShift security left with GitLab's scanners: secret detection, SAST, dependency scanning, container scanning and DAST, how to add them with templates or CI/CD components, what each tier gives you, reading results, blocking merges with policies, and hardening the pipeline itself.advanced8 min readCompleted
  11. Deploying to AWS from GitLab CIDeploy Orbit to AWS with no stored access keys: GitLab OIDC ID tokens, an IAM identity provider and a role whose trust policy checks project, branch and environment, then push the image to ECR, roll out on ECS, publish the web app to S3 and CloudFront, and wait for a healthy deployment.advanced8 min readCompleted
  12. Includes, Components and Multi-Project PipelinesScale CI beyond one file: include local, project, remote and template files, build reusable CI/CD components with spec:inputs and publish them to the CI/CD Catalog, split work into parent-child and dynamic child pipelines, and connect repositories with multi-project triggers and cross-project artifacts.advanced7 min readCompleted
  13. GitLab CI Best PracticesThe habits that keep pipelines fast, safe and maintainable: a ten-minute feedback budget, fail-fast ordering, caching and needs, pinned images and includes, least-privilege secrets and runners, readable YAML with components, measuring pipeline health, and the complete Orbit pipeline that ties the course together.advanced7 min readCompleted

↑ ↓ navigate Enter open Esc close