The GitLab Docs website is now available in Japanese!
Convert to GitLab CI/CD Flow
- Tier: Premium, Ultimate
- Add-on: GitLab Duo Core, Pro, or Enterprise
- Offering: GitLab.com, GitLab Self-Managed
The availability of this feature is controlled by a feature flag. For more information, see the history.
The Convert to GitLab CI/CD Flow helps you migrate your Jenkins pipelines to GitLab CI/CD. This flow:
- Analyzes your existing Jenkins pipeline configuration.
- Converts Jenkins pipeline syntax to GitLab CI/CD YAML.
- Suggests best practices for GitLab CI/CD implementation.
- Creates a merge request with the converted pipeline configuration.
- Provides guidance on migrating Jenkins plugins to GitLab features.
This flow is available in the GitLab UI only.
![note] The Convert to GitLab CI/CD Flow creates merge requests by using a service account. Organizations with SOC 2, SOX, ISO 27001, or FedRAMP requirements should ensure appropriate peer review policies are in place. For more information, see compliance considerations for merge requests.
Prerequisites
To convert a Jenkinsfile, you must:
- Have access to your Jenkins pipeline configuration.
- Have at least the Developer role in the target GitLab project.
- Meet the other prerequisites.
- Ensure the GitLab Duo service account can create commits and branches.
- Ensure that the Convert to GitLab CI/CD Flow is turned on.
Use the flow
To convert your Jenkinsfile to GitLab CI/CD:
- On the top bar, select Search or go to and find your project.
- Open your Jenkinsfile.
- Above the file, select Convert to GitLab CI/CD.
- Monitor progress by selecting Automate > Sessions.
- When the pipeline has successfully executed, on the left sidebar, select Code > Merge requests.
A merge request with the title
Duo Workflow: Convert to GitLab CIis displayed. - Review the merge request and make changes as needed.
Conversion process
The process converts:
- Pipeline stages and steps.
- Environment variables.
- Build triggers and parameters.
- Artifacts and dependencies.
- Parallel execution.
- Conditional logic.
- Post-build actions.
Example
Jenkinsfile input:
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'npm install'
sh 'npm build'
}
}
stage('Test') {
steps {
sh 'npm test'
}
}
stage('Deploy') {
when { branch 'main' }
steps {
sh './deploy.sh'
}
}
}
}GitLab output:
stages:
- build
- test
- deploy
build:
stage: build
script:
- npm install
- npm build
artifacts:
paths:
- node_modules/
- dist/
test:
stage: test
script:
- npm test
deploy:
stage: deploy
script:
- ./deploy.sh
only:
- main