GitLab CI Generator

Generate a .gitlab-ci.yml with stages and jobs.

  • Runs locally in your browser
  • No upload required

Try it

One or more of: build, test, deploy.

File
.gitlab-ci.yml
Stages
build, test
Content
# Generated in the browser — review this file and adapt it to your project before committing. stages: - build - test image: node:20-alpine cache: key: "$CI_COMMIT_REF_SLUG" paths: - .cache/ build: stage: build script: - npm ci - npm run build test: stage: test script: - npm test
# Generated in the browser — review this file and adapt it to your project before committing.
stages:
  - build
  - test

image: node:20-alpine

cache:
  key: "$CI_COMMIT_REF_SLUG"
  paths:
    - .cache/

build:
  stage: build
  script:
    - npm ci
    - npm run build

test:
  stage: test
  script:
    - npm test

Supported formats

Input
text
Output
text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

Generated a GitLab CI pipeline with 2 stage(s).

How it works

  • Declared the stages list: build, test.
  • Set the pipeline image to node:20-alpine.
  • Added a cache keyed by the commit ref.
  • Emitted one job per stage referencing its stage.
  • The deploy job is manual by default so it never runs unnoticed.
  • The file is a starting point: review the image and commands before committing.

Methodology

  1. Emit the `stages:` list in the canonical build/test/deploy order.
  2. Set the pipeline `image` and the optional `cache` block.
  3. Emit one job per selected stage with the matching commands and a `stage:` reference.

Usage

  1. Choose the container image and language.
  2. Select the stages the pipeline should run.
  3. Run the generator and copy the result into .gitlab-ci.yml.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

Node build and test

jsonSelect to copy
{
  "image": "node:20-alpine",
  "language": "node",
  "stages": [
    "build",
    "test"
  ],
  "cache": true
}

Python with deploy

jsonSelect to copy
{
  "image": "python:3.12-slim",
  "language": "python",
  "stages": [
    "test",
    "deploy"
  ],
  "cache": false
}

Limitations

How the generated pipeline is structured

GitLab runs one job per stage in the order declared by `stages`. Each generated job is a top-level key that names its stage and its scripts.

The cache block is only useful when the image's package manager writes to a predictable directory; edit the paths for your stack if needed.

Frequently asked questions

Why is the deploy job manual?
A generated placeholder should never deploy unexpectedly. The `when: manual` guard keeps the deploy job from running until you configure and trigger it.
Can I add more stages?
Yes. The generator covers build, test and deploy; edit the file to add runner-specific jobs.

Sources

  1. GitLab CI/CD YAML syntax reference — GitLab
  2. GitLab CI/CD pipeline documentation — GitLab