GitLab CI Reference

Basic Structure

stages: [test, build, deploy]Pipeline stages
image: node:20Docker image for job
script:Commands to run
only: [main]Run on specific branches
except: [tags]Skip for tags
when: manualManual trigger

Features

artifacts: paths:Save files between jobs
cache: key: paths:Cache files for speed
variables:Job environment variables
extends: .job-templateReuse job configuration
include: template:Include external templates