Tutorial

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

1

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.

2

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.

3

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.

4

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.

5

GitLab CI Artifacts

Define, use and download GitLab CI artifacts. Passing files between jobs, expiration times, test reports and deployment packages.

6

GitLab CI Cache

Speed up GitLab CI with caching. Cache paths and keys, cache policies, and caching node_modules, pip packages and Maven dependencies.

7

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.

8

GitLab Runners

What a GitLab Runner is and how it executes jobs. Runner types, executor choices, registration, tags, concurrency, and a Docker executor example.

9

GitLab CI Pipeline Rules

Control exactly when GitLab jobs run, rules:if, rules:changes, rules:exists, workflow rules, merge request pipelines and manual jobs.

10

GitLab CI Environments

GitLab CI environments and deployment tracking. Review apps, environment URLs, protected environments, approvals, scoped variables and DORA metrics.

11

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.

12

GitLab CI Testing

Run tests in GitLab CI. JUnit reports, code coverage and badges, cobertura visualisation, parallel execution, and a complete Jest pipeline.

13

GitLab CI Security Scanning

GitLab CI security scanning. SAST, DAST, secret detection, dependency and container scanning, and DevSecOps practices for secure pipelines.

14

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.

15

GitLab CI Multi-Project Pipelines

GitLab multi-project and child pipelines. Downstream triggers, include strategies, the trigger API, and cross-project dependencies.

16

GitLab CI Best Practices

Faster GitLab CI pipelines. Better caching, DAG execution with needs, reusable templates, rules-based workflows and protected deployments.