DevOpsLesson
DevOpsLesson

Free, comprehensive DevOps tutorials and learning roadmaps. Master Docker, Kubernetes, CI/CD, and more.

Stay Updated

Get notified about new tutorials and features.

Tutorials

  • What is DevOps?
  • Docker Tutorial
  • Terraform Tutorial
  • CI/CD Pipeline
  • All Tutorials

Roadmaps

  • DevOps Engineer
  • Cloud Engineer
  • SRE Path
  • All Roadmaps

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 DevOpsLesson. All rights reserved.

DOCKERKUBERNETESTERRAFORMAWSCI/CDLINUXGITDEVOPS ROADMAPCLOUD ROADMAPSRE ROADMAPGIT CHEATSHEETDOCKER CHEATSHEETK8S CHEATSHEETTF CHEATSHEETLINUX CHEATSHEETDOCKERFILE LINTERYAML VALIDATORCRON PARSERREGEX TESTER

Cicd Tutorial

Introduction to CI/CD
Getting Started with GitLab CI/CD
Stages, Jobs, Artifacts & Cache
Variables, Secrets and Environments in GitLab CI
GitLab Runners
GitLab CI Pipeline Rules
GitLab CI Environments
GitLab CI Docker Workflows
GitLab CI Testing
GitLab CI Security Scanning
GitLab CI Deploy to AWS
GitLab CI Multi-Project Pipelines
GitLab CI Best Practices

Stages, Jobs, Artifacts & Cache

PreviousPrev
Next

Understand how GitLab pipelines are organized with stages and jobs, how artifacts move files between jobs, and how cache speeds up repeated work.

GitLab pipelines are easier to understand when you separate three related ideas: stages and jobs define the flow of work, artifacts carry important files from one job to another, and cache speeds up repeated steps such as dependency installation. Together, these features turn a single .gitlab-ci.yml file into a reliable delivery workflow.

A pipeline usually starts with a stage plan such as build, test, and deploy. Inside each stage, you define one or more jobs. Jobs are the actual units of work: run tests, compile code, scan dependencies, or publish a release. Jobs in the same stage can run in parallel, while later stages wait for earlier ones unless you use advanced dependency rules.

Once jobs begin producing output, you need to decide what should be preserved. Artifacts are for files that matter to the pipeline result: compiled apps, coverage reports, JUnit XML files, or deployment bundles. They can be downloaded in the GitLab UI and passed to later jobs.

Cache is different. It is for reusable dependencies and temporary build inputs, such as node_modules, a Python package cache, or Maven dependencies. Cache improves speed across pipeline runs, but artifacts preserve specific outputs for correctness.

Use the sub-pages below to learn each topic in depth.

TopicWhat you will learnLink
Stages & JobsDefine pipeline phases, write jobs, control execution, and run work in parallel.Open sub-page
ArtifactsSave build outputs, pass files between jobs, manage report artifacts, and set expiration.Open sub-page
CacheReuse dependencies with smart cache keys, fallback keys, and cache policies.Open sub-page
PreviousPrev
Next

Continue Learning

Introduction to CI/CD

Learn what CI/CD means, why every software team needs it, how Continuous Integration, Continuous Delivery, and Continuous Deployment differ, and what a modern pipeline looks like from commit to production.

12 min read·Easy

Getting Started with GitLab CI/CD

Create your first GitLab CI/CD pipeline from scratch, write a .gitlab-ci.yml file, understand GitLab Runners, trigger your first pipeline, and read the job output. Step-by-step tutorial for beginners.

14 min read·Easy

GitLab CI Stages and Jobs

Master GitLab CI/CD stages and jobs, learn how to define pipeline stages, write job scripts, use rules and only/except conditions, control job ordering, and run parallel jobs.

12 min read·Easy

Explore Related Topics

Do

Docker Tutorials

Build and push Docker images in your pipelines

Gi

Git Tutorials

Trigger CI/CD pipelines from Git events

Try the Tool

YAML Validator

Validate GitHub Actions and CI/CD pipeline YAML files.

Cron Parser

Build and understand scheduled workflow cron expressions.

On This Page