GitLab CI YAML Generator

Build a copy-ready .gitlab-ci.yml visually. Pick a language preset, then configure stages, jobs, caching, artifacts, variables, and deploy rules — copy the result when you're done.

Language Presets

Pipeline

Global Variables

No variables. Add values exposed to every job, like NODE_ENV.

Jobs

Stage
Image override (optional)
Script (one command per line)
Services (comma separated)
before_script (optional)
Artifact paths (comma separated)
Artifacts expire_in
needs (job names)
Runner tags
Environment (deploy)
Run this job on
Stage
Image override (optional)
Script (one command per line)
Services (comma separated)
before_script (optional)
Artifact paths (comma separated)
Artifacts expire_in
needs (job names)
Runner tags
Environment (deploy)
Run this job on
Stage
Image override (optional)
Script (one command per line)
Services (comma separated)
before_script (optional)
Artifact paths (comma separated)
Artifacts expire_in
needs (job names)
Runner tags
Environment (deploy)
Run this job on

Generated .gitlab-ci.yml

Save as .gitlab-ci.yml at your project root and push to run the pipeline.

default:
  image: node:20-alpine

stages:
  - build
  - test
  - deploy

workflow:
  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
    - if: '$CI_COMMIT_BRANCH'

cache:
  key: '${CI_COMMIT_REF_SLUG}'
  paths:
    - node_modules/
  policy: pull-push

About GitLab CI YAML Generator

The GitLab CI YAML Generator is a free online tool that builds a copy-ready .gitlab-ci.yml from a simple form. Instead of memorizing GitLab's pipeline syntax — stage ordering, cache keys, artifacts, and rule expressions — you pick a language preset and adjust a few fields, and the tool emits a valid, well-indented pipeline you can drop straight into your repository.

A .gitlab-ci.yml file describes your continuous integration pipeline: the stages that run in order, the jobs inside each stage, and the Docker image and script each job uses. This generator covers the parts that matter most — a default image, ordered stages, dependency cache, build artifacts with expiry, global variables, per-job rules, runner tags, needs for faster DAG pipelines, and deploy jobs with an environment.

Everything runs locally in your browser. Image names, scripts, and variables are never sent to a server. If you also ship a container image, pair this with the Dockerfile Generator and the Docker Compose Generator.

How to Use GitLab CI YAML Generator

  1. 1. Pick a language preset (Node, Python, Go, Rust, Java, Docker, or GitLab Pages) to load a sensible starting pipeline.
  2. 2. Set the default image and the ordered list of stages. Stages run top to bottom and gate each other.
  3. 3. Configure dependency caching, a global before_script, and any global variables shared by every job.
  4. 4. Edit each job: its stage, script commands, optional image, services (for Docker-in-Docker), artifacts, needs, runner tags, and environment.
  5. 5. Choose when each job runs — every pipeline, the default branch, merge requests, tags, or manual.
  6. 6. Click Copy, save as .gitlab-ci.yml at your repository root, and push to trigger the pipeline.

Common Use Cases

Bootstrapping CI for a new repo

Get a correct build → test → deploy pipeline in seconds instead of copying a half-remembered config from another project.

Standardizing across microservices

Generate consistent pipelines with the same stages, cache keys, and deploy rules for every service in your group.

Building & pushing Docker images

Use the Docker preset to build and push to the GitLab Container Registry with Docker-in-Docker services pre-wired.

Publishing a GitLab Pages site

The Pages preset builds your static site and serves the public/ folder — ideal for docs, blogs, and SPAs.

Speeding up slow pipelines

Add caches for node_modules/, .m2/, or target/, and use needs to start jobs early with a DAG instead of strict stages.

Learning GitLab CI

See how stages, jobs, cache, artifacts, and rules fit together for your language, with valid indentation every time.

Frequently Asked Questions