GitLab CI Config Generator

Visually build .gitlab-ci.yml configurations by defining stages, jobs, services, variables, and rules. Copy or download ready-to-use pipeline files.

About This Tool

The GitLab CI Config Generator is a free browser-based tool that helps you build .gitlab-ci.yml pipeline configuration files through an interactive visual form. Instead of writing YAML from scratch and worrying about indentation errors, you define stages, add jobs, configure caching and artifacts, set up rules, and the tool generates valid, properly formatted YAML output.

The builder supports the most commonly used GitLab CI/CD features: pipeline stages, Docker images per job, before_script / script / after_script blocks, artifact paths with expiration, caching with key and policy settings, job needs for DAG pipelines, runner tags, conditional rules with if expressions, services definitions for Docker-in-Docker and database containers, and both global and job-level variables.

Built-in templates let you start quickly with common patterns: Node.js CI, Python CI, Docker Build & Push, and Go CI. Each template pre-fills stages, images, scripts, and caching — you just customize the details.

If you work with Docker containers, the Docker Run Command Builder provides a similar visual experience for docker run commands. For validating existing YAML files, try the YAML Formatter & Validator. And if you need to lint Dockerfiles referenced in your CI jobs, the Dockerfile Linter can help catch common issues before building images.

All processing runs entirely in your browser. No pipeline configurations, variables, secrets, or any other data is ever sent to any server. This tool is safe to use with production CI/CD configurations.

How to Use

  1. Optionally select a Template to start with a pre-configured pipeline (Node.js, Python, Docker, Go, or Blank).
  2. Define your pipeline Stages by adding stage names in the order they should run. Remove unwanted stages by clicking the X button.
  3. Set a Default Image if all jobs share the same Docker image, or leave it blank to set images per job.
  4. Add Global Variables that should be available to all jobs (e.g., NODE_ENV, DOCKER_HOST).
  5. Click Add Job to create jobs. For each job, fill in the name, stage, image, scripts, artifacts, cache, services, rules, and any job-specific variables.
  6. Review the Generated .gitlab-ci.yml output on the right panel. The YAML updates in real time as you make changes.
  7. Click Copy or press Ctrl+Shift+C to copy the YAML to your clipboard, or click Download to save as a .gitlab-ci.yml file.

Popular GitLab CI Examples

View all GitLab CI examples →

FAQ

Which GitLab CI features are supported?

The generator supports stages, jobs with image/script/before_script/after_script, artifacts (paths + expire_in), cache (key, paths, policy), services (name + alias), job-level and global variables, rules (if/when/allow_failure), needs (DAG dependencies), tags, and allow_failure. It covers the most commonly used keywords for building CI/CD pipelines.

Can I use this for GitLab.com and self-hosted GitLab?

Yes. The generated .gitlab-ci.yml follows the standard GitLab CI YAML syntax that works with both GitLab.com (SaaS) and self-hosted GitLab instances of any version that supports the CI/CD features you configure.

How do I set up Docker-in-Docker (DinD)?

Add 'docker:24-dind' as a service with the alias 'docker' in your job's Services section. Set the global variables DOCKER_HOST to 'tcp://docker:2376' and DOCKER_TLS_CERTDIR to '/certs'. The Docker Build & Push template pre-configures this for you.

What are 'needs' and how do they differ from stages?

Stages run sequentially by default — all jobs in stage 1 must finish before stage 2 begins. The 'needs' keyword creates a Directed Acyclic Graph (DAG) pipeline where a job can start as soon as its specific dependencies finish, even if other jobs in earlier stages are still running. This can significantly speed up pipelines.

How do rules work?

Rules determine when a job is included in a pipeline. Each rule has an 'if' condition (e.g., '$CI_COMMIT_BRANCH == "main"') and a 'when' value (on_success, manual, delayed, always, never). Rules are evaluated in order — the first matching rule determines the job's behavior. If no rule matches, the job is not included.

Is my data safe?

Yes. All YAML generation runs entirely in your browser using JavaScript. No pipeline configurations, Docker registry URLs, variable values, or any other data is ever sent to any server. You can verify this by checking the Network tab in your browser's developer tools while using the tool.

Can I edit the generated YAML manually?

The generated YAML is read-only in the output panel, but you can copy it or download it and then edit it in any text editor. For validating and formatting YAML, use the YAML Formatter & Validator tool on this site.

Related Tools