GitLab CI to CircleCI Converter

Convert .gitlab-ci.yml to CircleCI 2.1 config.yml. Translates stages, jobs, parallel matrix, cache, artifacts, and rules. Side-by-side diff, audit log, no upload.

Migrating from GitLab CI to CircleCI

GitLab's `stages` plus `needs` model maps cleanly to CircleCI's `workflows.<name>.jobs` graph. The converter walks every GitLab job, picks an equivalent Docker executor (defaulting to `cimg/base:stable` if no explicit `image:` was set), and rewrites `script` lines as CircleCI `run` steps. Cache and artifact handling change shape: GitLab's job-level `cache:` block becomes a `restore_cache` + `save_cache` pair, and GitLab's `artifacts:` block becomes `store_artifacts` plus `persist_to_workspace` so downstream jobs can attach.

Syntax cheat sheet

ConceptGitLab CICircleCI
Stage / job orderstages: [test, deploy] test: stage: testworkflows: main: jobs: - test - deploy: requires: [test]
Imageimage: node:20docker: [{ image: cimg/node:20 }]
Variable expansion$CI_COMMIT_REF_NAME<< pipeline.git.branch >>
Cachecache: key: foo paths: [node_modules]- restore_cache: { keys: [foo] } - save_cache: { key: foo, paths: [node_modules] }
Artifactartifacts: paths: [dist]- store_artifacts: { path: dist } - persist_to_workspace: { root: ., paths: [dist] }

Gotchas to watch for

  • warning

    Pick a real executor image

    The default `cimg/base:stable` runs your scripts but lacks language toolchains. Replace it with `cimg/node:20`, `cimg/python:3.11`, etc., for faster cold starts.

  • warning

    Rules → filters

    GitLab `rules:` translate to CircleCI `filters:` (branches/tags) on the workflow job entry. Step-level rules disappear and become bash conditionals.

  • warning

    parallel:matrix → workflow matrix

    GitLab `parallel: matrix:` becomes CircleCI `matrix.parameters:` on the workflow job. Each job parameter must be referenced via `<< parameters.foo >>` inside the job.

  • warning

    before_script becomes prefix steps

    GitLab `before_script:` lines are inserted at the top of the job's `steps:` list, before the converted `script:` lines.

Worked examples

GitLab Node test → CircleCI

Single stage, single job. Default Docker executor.

GitLab CI
stages:
  - test
test:
  stage: test
  image: node:20
  script:
    - npm ci
    - npm test
CircleCI
version: 2.1
jobs:
  test:
    docker:
      - image: node:20
    steps:
      - checkout
      - run: npm ci
      - run: npm test
workflows:
  main:
    jobs: [test]

Frequently asked questions

Does it support GitLab includes:?expand_more

No. Flatten your YAML before converting.

How does it handle GitLab Runner tags?expand_more

`tags:` becomes a comment in the CircleCI output, since CircleCI uses resource classes rather than tags. Pick the appropriate `resource_class:` after conversion.

Are GitLab variables auto-translated?expand_more

Yes — common `$CI_*` variables are rewritten to CircleCI `<< pipeline.* >>` references. Less common ones are flagged for manual review.

Related Tools