GitLab CI/CD Generator
Set up a GitLab pipeline without memorising the YAML. Choose your image, stages, jobs, dependency caching and variables, then copy or download a ready-to-commit .gitlab-ci.yml.
How to generate a .gitlab-ci.yml
- Set the Docker image and package manager your project uses, like node:20 and npm.
- Toggle the jobs you need (install, lint, test, build, deploy) and turn on caching if you want faster runs.
- Copy the generated YAML or download it as .gitlab-ci.yml into the root of your repository.
Examples
Lint, test and build with caching
image node:20, jobs: lint+test+build, cacheDeps: true
image: node:20
stages:
- build
- test
- deploy
cache:
paths:
- .npm/
- node_modules/
lint:
stage: test
script:
- npm ci
- npm run lint
...Test-only pipeline
image node:20, jobs: test
image: node:20
stages:
- build
- test
- deploy
test:
stage: test
script:
- npm ci
- npm testFrequently asked questions
What is a .gitlab-ci.yml file?
It is the configuration GitLab CI/CD reads to run your pipeline. It defines the Docker image, the ordered stages and the jobs (with their scripts) that run on every push or merge request.
Where do I put the generated file?
Save it as a file named exactly .gitlab-ci.yml in the root of your repository. GitLab detects it automatically and runs the pipeline on your next push.
What does the cache option do?
It adds a cache: block keyed on your lockfile that stores the dependency directory (like node_modules and the package manager store) between jobs and runs, so installs are faster on repeat pipelines.
Can I use yarn or pnpm instead of npm?
Yes. Pick your package manager and the install, lint, test and build scripts switch to the matching commands, such as yarn install --frozen-lockfile or pnpm test.
Do the stages have to be build, test and deploy?
No. Those are sensible defaults that match GitLab's conventions, but you can edit the stage list. Each job is mapped to a stage, and GitLab runs the stages in the order you list them.
Is my configuration sent to a server?
No. The YAML is generated entirely in your browser. Nothing you type, including variable names and values, is uploaded or stored.
Related tools
Gitignore Generator
Build a .gitignore from Node, Python, Java, Go, Rust, macOS, Windows and more. Pick your stacks, copy or download the file. Runs in your browser.
YAML Formatter
Format and validate YAML online. Fix indentation, normalize messy YAML, sort keys and catch syntax errors. Runs entirely in your browser.
JSON Formatter
Format, validate and minify JSON online. Pretty-print with custom indentation, sort keys and catch syntax errors. Runs in your browser.
.env to JSON
Convert a .env file to JSON, or JSON back to .env. Parses KEY=value lines, comments, quotes and export. Runs entirely in your browser.
Aspect Ratio Calculator
Calculate aspect ratios fast. Enter a ratio like 16:9 and one dimension to get the other, or enter width and height to simplify the ratio.
Base58 Encoder
Encode and decode Base58 online with the Bitcoin alphabet. Convert text to Base58 or back, UTF-8 safe, no confusing 0 O I l. Runs in your browser.