Migrations feel daunting, which is one of the reasons teams put them off as long as possible. Even when tools are brittle or not working as they should, it’s the fear of the unknown that keeps us from making the plunge. Teams might have found workarounds to solve common problems but those only work… until they don’t work. If you know that you need to make a tool change or migration, it’s much better to do it early rather than during a crisis.
Migrations don’t have to be scary. If you’re tired of brittle builds and endless plugin maintenance, migrating your CI/CD doesn’t have to be a headache. Several teams have made the switch from Jenkins CI to GitLab CI/CD, and there are resources available to ease the transition.
From Jenkins to GitLab using Docker
The team at Linagora loved that GitLab includes Git repository management, issue tracking, code review, an IDE, activity streams, wikis, and built-in CI/CD to test, build, and deploy code. In order to take advantage of these all-in-one features, they needed to find a way to switch over from Jenkins CI. Luckily, GitLab’s Docker support and documentation allowed them to utilize custom Docker images, spin up services as part of testing, build new Docker images, and run on Kubernetes.
Running Jenkinsfiles in GitLab CI/CD
One short-term solution teams can use when migrating from Jenkins to GitLab CI/CD is using Docker to run a Jenkinsfile in GitLab CI/CD while the syntax is being updated. While this doesn’t address the endless plugin dependencies, it’s a stop-gap measure that can get your team working in GitLab until the migration is complete.
Using Auto DevOps
Auto DevOps can potentially be used to build, test, and deploy your applications with little to no configuration needed at all. One of the more time-consuming tasks during a Jenkins migration can be converting the pipelines from Groovy to YAML, but Auto DevOps provides predefined CI/CD configurations – just push your code and Auto DevOps can build a default pipeline. Auto DevOps offers more features including security testing, performance testing, and code quality testing. If you need advanced customizations, you can modify the templates without having to start over on a completely different platform.
GitLab senior solutions manager Brendan O’Leary provided a brief overview of how to convert a Jenkins pipeline built with Maven into a GitLab CI/CD pipeline using Auto DevOps.
Advice from teams that made the switch
At our GitLab Commit event in London, the team at adSoul, a Germany-based marketing automation company, discussed their own transition from Jenkins to GitLab. They offered insight into their migration process, but for others considering GitLab CI/CD, here are some best practices:
In the spirit of iteration, it’s better to make incremental changes than try to tackle everything all at once. Even if it’s just small projects, or just running a Jenkinsfile in the meantime, be patient and aim for steady progress
Utilize tools effectively
With Docker and Auto DevOps, you have the tools available to ease the transition so you’re not reinventing the wheel.
Keep teams informed of the process and communicate any changes. This can also apply to the naming of your new pipelines. Aim for clear job names, style your config for a better overview, and write comments for variables and hard-to-understand code.
For more information, check out our migrating from Jenkins documentation.