Skip to content

Demonstration project

Jenkins to GitLab CI migration playbook

The step-by-step approach we use to move legacy Jenkins jobs to GitLab CI (or GitHub Actions) without disrupting releases.

Demonstration project

This is a demonstration of our approach to a common problem. It describes a reference architecture and is not an account of a specific client engagement.

Project overview

Many teams run Jenkins servers that have grown over years, with plugins and jobs that few people understand. This playbook describes how we migrate safely.

Business problem

A single Jenkins server hosts dozens of freestyle jobs with hard-coded credentials and outdated plugins. Upgrades are avoided because nobody is sure what will break.

Technical challenge

Preserve every job that still matters, remove the ones that do not, and keep releases running throughout the migration.

Architecture

  • Pipelines defined as code in each repository (.gitlab-ci.yml)
  • Shared templates for common build, test and deploy stages
  • Runners on autoscaling Linux virtual machines or Kubernetes
  • Credentials moved to protected CI variables or an external secrets manager

Implementation

  • Inventory of Jenkins jobs: owner, trigger, last successful run, dependencies
  • Decision for each job: migrate, merge or retire
  • Shared pipeline templates built and tested on a pilot repository
  • Parallel running of old and new pipelines until outputs match
  • Cut-over per repository, then decommissioning of the Jenkins server

Technology stack

  • Jenkins
  • GitLab CI
  • Docker
  • Linux
  • Terraform

What this approach delivers

  • Pipelines are versioned alongside the code they build
  • Credentials are no longer stored in job configuration
  • Legacy server and plugin maintenance is removed

← All work

Want this approach applied to your setup?

Tell us what you are working on. We will reply within one business day and suggest a sensible next step.