‘Pipeline as code’ or defining the deployment pipeline through code rather than configuring a running CI/CD tool, provides tremendous benefits for teams automating infrastructure across their environments.

One of the most popular ways to implement a pipeline as code is through Jenkins Pipeline. Jenkins, an open source automation server, is used to automate tasks associated with building, testing, and deploying software.

Jenkins Pipeline is a suite of Jenkins features, installed as plugins, which enable implementation of continuous delivery pipelines, which are the automated processes for getting software from source control through deployment to end users.

Pipeline supports building Continuous Delivery (CDel) pipelines through either a Web UI or a scripted Jenkinsfile. Jenkinsfiles, using a domain specific language based on the Groovy programming language, are persistent files that model delivery pipelines “as code”, containing the complete set of encoded steps (steps, nodes, and stages) necessary to define the entire application life-cycle. Pipeline facilitates CI/CD as it’s the path to modeling and then automating software delivery; essentially becoming the intersecting point between development and operations. The Pipeline plugin, inspired by the build flow Plugin, also provides other capabilities like the ability to suspend and resume executing jobs, to manage pipeline code with source control, and to share libraries to extend the domain specific language support.

The most common basic pipeline described in a Jenkinsfile consists of three stages: Build, Test, and Deploy. The Build stage is typically where source code is assembled, compiled and packaged. Jenkinsfile is not a replacement for a build tool, but rather orchestrates the build and manages the resulting outputs through scripted steps. The Test stage, crucial to successful CI/CD processes, is enabled by a number of Jenkins plugins that facilitate test execution and results recording, which are visualized in the Web Dashboard UI. Finally the Deployment stage encompasses anything from publishing build artifacts to a management repository to pushing code to pre-production and production environments. Build jobs can be configured to stop upon any step failure, which increases build quality and reliability by not allowing failing code to progress through the deployment process, saving time and resources while reducing risk.

What are the Benefits of Jenkins Pipeline?

Using Jenkins Pipeline to automate CI/CD pipelines dramatically increases repeat-ability, reliability, efficiency, and quality. The Pipeline allows managing the process code like any other production code, facilitating iterative development for pipelines, along with access control, code review, audit trails, and a single source for truth that is review-able (and potentially an approval/promotion process) by multiple project members. Multi-branch pipelines are also possible to configure different jobs for different branches within a single project, eliminating the need for manual job creation and management and enabling automated job stop or suspension as needed. All of this results in consistency, reliability, efficiency, and increased quality.

Learn More!

If you want to learn more about how Jenkins Pipeline can help with your DevOps implementation and support Agile Development, and how to actually implement Jenkinsfile Pipelines in a hands-on workshop, register now for Coveros DevOps Week DC today!

Leave a comment

Your email address will not be published. Required fields are marked *