Basic Structure
stages: [test, build, deploy] | Pipeline stages |
image: node:20 | Docker image for job |
script: | Commands to run |
only: [main] | Run on specific branches |
except: [tags] | Skip for tags |
when: manual | Manual trigger |
Features
artifacts: paths: | Save files between jobs |
cache: key: paths: | Cache files for speed |
variables: | Job environment variables |
extends: .job-template | Reuse job configuration |
include: template: | Include external templates |