Convert to GitLab CI/CD Flow
- Tier: Free, Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
Version history
- Introduced as a beta in GitLab 18.3 with a flag named
duo_workflow_in_ci. Disabled by default, but can be enabled for the instance or a user. - Feature flag
duo_workflow_in_cienabled by default in GitLab 18.4. Feature flagduo_workflowmust also be enabled, but it is enabled by default. - Generally available in GitLab 18.8.
- Feature flags
duo_workflow_in_ciandduo_workflowremoved in GitLab 18.9. - Available on the Free tier on GitLab.com with GitLab Credits in GitLab 18.10.
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
To convert a Jenkinsfile, you must:
- Have access to your Jenkins pipeline configuration.
- Have the Developer, Maintainer, or Owner role in the target GitLab project.
- Meet the other prerequisites.
- Ensure the GitLab Duo service account can create commits and branches.
- Ensure Allow foundational flows and Convert to GitLab CI/CD are turned on for the top-level group.
Use the flow
To convert your Jenkinsfile to GitLab CI/CD:
- In 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, in 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