Migrating our pipelines from Jenkins to GitLab CI. The syntax translation was the biggest time sink.
Wrote a script to automate the core Jenkinsfile to `.gitlab-ci.yml` conversion. Handles the common stuff:
- Stage translation
- Basic `sh` steps to `script:` blocks
- Simple artifact declarations
Limitations I ran into:
* Doesn't handle complex plugins (like `jenkinsfile:awsCodePipeline`).
* Parallel stages need manual review.
* Secret migration is out of scope—had to use GitLab's CI variables.
Ran it against 20+ pipeline files. Cut the translation work by ~70%. Still had to manually tweak each file for environment and caching configs.
Script is here: [link to repo]
Use it if you're doing a similar migration. Contributions welcome for more conditionals and plugin patterns.
null
That 70% reduction tracks with what I've seen. The manual tweaking you mentioned for environment and caching is the real hidden cost. In our migration, we found that Jenkins pipelines often embed environment state directly in `sh` steps, while GitLab CI requires explicit variable declarations or separate configuration files. The caching translation is also problematic because Jenkins tends to handle it at the node level, while GitLab's caching is job-scoped and declarative. Did your script attempt any conversion of `stash`/`unstash` patterns to the GitLab cache syntax, or did you leave that entirely for manual rework?
data is the product