GitLab CI/CD Tutorial
Master GitLab CI/CD from scratch: pipelines, stages, jobs, runners, variables, Docker builds, testing, security scanning, AWS deployments, and multi-project pipelines.
16 lessons in this tutorial
Introduction to CI/CD
What CI/CD means and why every team needs it. How Continuous Integration, Delivery and Deployment differ, and what a modern pipeline looks like.
Getting Started with GitLab CI/CD
Create your first GitLab CI/CD pipeline. Write a .gitlab-ci.yml, understand GitLab Runners, trigger a pipeline and read the job output.
GitLab CI/CD Pipeline Structure: How Pipelines, Stages, Jobs, Artifacts and Cache Fit Together
The architecture of a GitLab pipeline. How pipelines, stages and jobs relate, what runners do, and where artifacts and cache belong.
GitLab CI Stages and Jobs
GitLab CI stages and jobs. Defining stages, writing job scripts, rules and only/except conditions, job ordering and parallel jobs.
GitLab CI Artifacts
Define, use and download GitLab CI artifacts. Passing files between jobs, expiration times, test reports and deployment packages.
GitLab CI Cache
Speed up GitLab CI with caching. Cache paths and keys, cache policies, and caching node_modules, pip packages and Maven dependencies.
Variables, Secrets and Environments in GitLab CI
GitLab CI/CD variables and secrets. Predefined and custom variables, masked and protected values, group-level and environment-scoped variables.
GitLab Runners
What a GitLab Runner is and how it executes jobs. Runner types, executor choices, registration, tags, concurrency, and a Docker executor example.
GitLab CI Pipeline Rules
Control exactly when GitLab jobs run, rules:if, rules:changes, rules:exists, workflow rules, merge request pipelines and manual jobs.
GitLab CI Environments
GitLab CI environments and deployment tracking. Review apps, environment URLs, protected environments, approvals, scoped variables and DORA metrics.
GitLab CI Docker Workflows
Build Docker images in GitLab CI. Docker-in-Docker vs Kaniko, Container Registry authentication, tagging strategies, and a full build and push example.
GitLab CI Testing
Run tests in GitLab CI. JUnit reports, code coverage and badges, cobertura visualisation, parallel execution, and a complete Jest pipeline.
GitLab CI Security Scanning
GitLab CI security scanning. SAST, DAST, secret detection, dependency and container scanning, and DevSecOps practices for secure pipelines.
GitLab CI Deploy to AWS
Deploy to AWS from GitLab CI. OIDC instead of static keys, S3 and EC2 deploys, ECR pushes, ECS updates and Terraform automation.
GitLab CI Multi-Project Pipelines
GitLab multi-project and child pipelines. Downstream triggers, include strategies, the trigger API, and cross-project dependencies.
GitLab CI Best Practices
Faster GitLab CI pipelines. Better caching, DAG execution with needs, reusable templates, rules-based workflows and protected deployments.