Skip to content
Tutorials Center
My learning

Topics

CI/CD with GitHub Actions, Jenkins and GitLab Tutorial

Learn CI/CD with GitHub Actions, Jenkins and GitLab step by step: 44 lessons in 10 chapters with examples, quizzes, diagrams and projects.

Start learning →

of lessons completed

CI/CD Fundamentals

  1. 1 What Is CI/CD? Learn what CI/CD means, how continuous integration, delivery and deployment differ, what a pipeline does, and what it costs and saves your team.
  2. 2 Anatomy of a Pipeline Meet the parts every CI/CD pipeline shares: triggers, jobs, stages, steps, runners, artifacts, environments and the exit codes that decide pass or fail.
  3. 3 GitHub Actions, Jenkins and GitLab Compared Compare GitHub Actions, Jenkins and GitLab CI/CD: hosting, configuration style, vocabulary, strengths and costs, and a simple way to choose between them.
  4. 4 YAML for Pipeline Authors Learn the YAML you need for GitHub Actions and GitLab CI: mappings, lists, strings, multi-line scripts, anchors, and the quoting traps that break pipelines.

GitHub Actions Basics

  1. 5 Your First Workflow Write and understand your first GitHub Actions workflow: where the file lives, name, on, jobs, runs-on, steps, uses versus run, and how to read the run log.
  2. 6 Triggers: push, pull_request, schedule and More Learn GitHub Actions triggers: branch and path filters, pull_request versus pull_request_target, manual runs with inputs, cron schedules and release events.
  3. 7 Jobs, Steps and Dependencies Learn how GitHub Actions jobs run in parallel, how needs orders them, and how if, outputs, continue-on-error and timeout-minutes control a workflow.
  4. 8 Expressions and Contexts Master the ${{ }} syntax in GitHub Actions: the github, env, vars, secrets, matrix and needs contexts, built-in functions and status checks like always().
  5. 9 Matrix Builds Run one job across many operating systems and versions with a GitHub Actions matrix. Learn include, exclude, fail-fast, max-parallel and fromJSON.
  6. 10 Caching and Artifacts Speed up workflows with actions/cache keys and restore-keys, setup-* caching and hashFiles, and pass build output between jobs with upload and download artifacts.
  7. 11 Secrets, Variables and Environment Variables Understand env at workflow, job and step level, repository variables versus encrypted secrets, log masking, GITHUB_TOKEN permissions and fork behavior.

GitHub Actions in Practice

  1. 12 CI for Node and Python Projects Build a complete CI workflow for Node.js and Python: checkout, setup actions, cached installs, lint, tests, coverage upload, version matrices and concurrency.
  2. 13 CI for Java, Go and PHP Projects Build and test Java, Go and PHP projects in GitHub Actions: setup actions, dependency caching, test reports and a database service container for integration tests.
  3. 14 Building and Pushing Docker Images Build, tag and push container images from GitHub Actions with Buildx, docker/build-push-action, GHCR login, layer caching and multi-platform builds.
  4. 15 Reusable Workflows and Composite Actions Stop copying YAML between repositories: write reusable workflows with workflow_call and composite actions, pass inputs, secrets and outputs, and version them safely.
  5. 16 Environments, Approvals and Deployments Protect deployments with GitHub environments: required reviewers, environment secrets, branch rules, OIDC cloud login without stored keys, and deploy concurrency.
  6. 17 Self-Hosted Runners and Runner Costs Learn how runner labels and groups route jobs, when to use self-hosted or larger runners, how ephemeral runners stay safe, and how billing minutes add up.

Jenkins

  1. 18 Jenkins: Controller, Agents and Jobs Meet Jenkins: how the controller and agents work, how to run it in Docker, what plugins and credentials do, and how freestyle jobs differ from pipelines.
  2. 19 The Declarative Jenkinsfile Write a declarative Jenkinsfile: pipeline, agent, stages, steps, environment, options, post conditions, when and parameters, with a runnable model of the flow.
  3. 20 Scripted Pipelines and Shared Libraries Learn scripted Jenkins pipelines in Groovy: node, parallel, try/catch/finally, then share code with a library (vars/, src/, @Library) and avoid CPS pitfalls.
  4. 21 Agents, Docker Agents and Credentials Choose Jenkins agents by label or Docker image, store secrets in the credentials store, use withCredentials safely, and trigger builds with webhooks, not polling.

GitLab CI/CD

  1. 22 GitLab CI/CD Basics Learn GitLab CI/CD from scratch: the .gitlab-ci.yml file, stages, jobs, script, image, variables, rules, runners and executors, and how to read the pipeline view.
  2. 23 Rules, needs, Artifacts and Cache Control GitLab CI jobs with rules and workflow:rules, speed pipelines up with the needs DAG, pass files with artifacts and reports, and reuse dependencies with cache.
  3. 24 Includes, Templates and Environments Reuse GitLab CI configuration with include, extends, !reference and hidden jobs, then track deployments with environments, review apps, manual jobs and protected variables.

Testing and Quality Gates

  1. 25 Test Stages in a Pipeline Decide where unit, integration and end-to-end tests belong in a CI/CD pipeline, get fast feedback, handle flaky tests and publish test reports.
  2. 26 Linting, Coverage and Quality Gates Add linters, formatters, coverage thresholds, required status checks, branch protection and CODEOWNERS to turn CI results into rules that block bad merges.
  3. 27 Securing Your Pipeline Harden GitHub Actions pipelines: least-privilege tokens, pinned actions, script injection, pull_request_target risks, secret scanning, SBOMs and signing.

Releases and Deployment

  1. 28 Versioning and Automated Releases Use semantic versioning, conventional commits, tags, changelogs and GitHub Releases to automate releases, plus how release branches fit in.
  2. 29 Deployment Strategies Compare recreate, rolling, blue-green and canary deployments, feature flags, rollbacks, expand/contract database migrations and smoke tests in CI/CD.
  3. 30 Deploying to Servers, Containers and Static Hosting Deploy from a pipeline to a server over SSH, a container host, GitHub Pages or Kubernetes, authenticate to clouds with OIDC and meet the GitOps idea.
  4. 31 Infrastructure as Code in Pipelines Run Terraform safely from CI: fmt, validate and plan on pull requests, apply on merge, state locking, plan comments and scheduled drift detection.

Performance and Operations

  1. 32 Making Pipelines Fast Speed up CI/CD pipelines with caching, parallel jobs, test sharding, path filters, shallow clones, small images and critical path analysis.
  2. 33 CI for Monorepos Run CI only for what changed in a monorepo: path filters, affected-package detection, dynamic matrices, per-package versions and GitLab child pipelines.
  3. 34 Debugging Failing Pipelines Find out why a CI pipeline fails: read logs from the first error, turn on debug logging, reproduce runs locally and fix the most common failure causes.
  4. 35 Pipeline Metrics and Maintenance Measure delivery with the four DORA metrics, track flaky tests and runner cost, send pipeline notifications to chat and automate updates with Dependabot.

Projects

  1. 36 Project: CI for a Node.js Library Build a complete CI pipeline for a Node.js library: lint, test matrix, coverage gate, build, publish to npm on a version tag and required status checks.
  2. 37 Project: Build, Scan and Deploy a Container Build a pipeline that tests, builds and scans a Docker image, pushes it by commit SHA, deploys to staging, waits for approval and promotes to production.
  3. 38 Project: A Jenkins Multibranch Pipeline Build a Jenkins multibranch pipeline step by step: a Jenkinsfile with build, test and package stages, branch rules, parallel checks and post notifications.
  4. 39 Project: A GitLab Pipeline with Review Apps Build a GitLab CI/CD pipeline with stages, includes, merge request pipelines, review environments, a manual production deploy and cleanup when a branch is gone.
  5. 40 Project: Release Automation for a Monorepo Automate releases in a monorepo: read conventional commits, bump per-package versions, write changelogs, create tags, and publish only the packages that changed.

Practice and Review

  1. 41 Practice: Pipeline Exercises with Solutions Test your CI/CD skills with ten graded pipeline exercises: fix broken YAML, write matrices, cache keys, needs graphs, gating rules and secret handling.
  2. 42 Common CI/CD Mistakes and Anti-Patterns Learn the CI/CD anti-patterns that waste time and cause incidents: leaked secrets, unpinned actions, slow jobs, ignored flaky tests, manual steps and no rollback.
  3. 43 CI/CD Interview Questions Prepare for CI/CD interviews with answers on concepts, GitHub Actions, Jenkins, GitLab, pipeline security, deployment strategies and real scenarios.
  4. 44 CI/CD Cheat Sheet A side-by-side CI/CD cheat sheet for GitHub Actions, Jenkins and GitLab: triggers, jobs, expressions, caching, secrets, artifacts and common recipes.