Convert to GitLab CI/CD flow
- Tier: Premium, Ultimate
- Add-on: GitLab Duo Core, Pro, or Enterprise
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
- Status: Beta
Version history
- Introduced as a beta in GitLab 18.3 with a flag named
duo_workflow_in_ci
. Disabled by default. Theduo_workflow
flag must also be enabled.
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.
Prerequisites
Before you can convert a Jenkinsfile, you must have:
- Access to your Jenkins pipeline configuration.
- At least Developer role in the target GitLab project.
- GitLab Duo turned on for your group or project.
- Feature flags
duo_workflow
andduo_workflow_in_ci
enabled.
Use the flow
To convert your Jenkinsfile to GitLab CI/CD:
- On the left sidebar, 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 CI
is 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