Developers who are tasked with creating and maintaining pipelines want reliable, repeatable builds.
Freestyle jobs are common among Jenkins users as they are limitlessly flexible. They can also be easy to abuse, difficult to maintain, introduce incompatibility and worst of all, shared libraries with complex scripting can jeopardize the stability of the controller. Translating these jobs into more modern pipelines is time consuming and error prone.
We know that a lot of love went into those Freestyle jobs, so we needed to find a way to translate that work to the closest approximation into a Declarative Pipeline. And for pipelines that are translated to Declarative or build that way from scratch, we need to ensure maintainability. As the authors of the Jenkins Declarative Pipeline syntax, CloudBees can help.
Declarative Pipelines provide a more modern, opinionated approach. The resulting Jenkinsfile can then be committed to a Git repo in a ‘pipeline as code’ fashion. We are here to help developers using Jenkins and CloudBees CI make the most of your pipelines. To increase adoption and use of Declarative Pipelines, CloudBees supports the Declarative Pipeline Migration Assistant as part of our CAP program of certified plugins.
The Declarative Pipeline Migration Assistant plugin is a tool to convert Freestyle pipelines into Declarative Pipelines. This plugin creates a Jenkinsfile that includes predictable configurations, structure, policies, rules and conditions for supported plugins with placeholder stages for plugins not yet supported. This plugin helps alleviate the tedious manual effort of translating pipelines which is prone to human error and time consuming to troubleshoot.
A key value for using Declarative Pipelines is the ability to easily maintain them. This is an especially tall order when faced with maintaining multiple configurations of larger, more complex pipelines. The Declarative Pipeline Matrix feature allows users to specify a list of stages once and then run that same list in parallel on multiple configurations. The new matrix section executes a set of one or more Pipeline stages multiple times - once for every combination defined in the matrix. Matrix combinations are generated from static lists of predefined values. Filters can also be provided to exclude specific combinations. With the Matrix feature, users no longer have to make changes in multiple places throughout the pipeline. An equivalent pipeline created without Matrix would easily be several times larger, and much harder to understand and maintain.
With CloudBees CI, developers can easily create Declarative Pipelines, migrate their existing Freestyle jobs to Declarative, and easily maintain those pipelines using ‘pipeline as code’.