The CI/CD pipeline is a crucial part of DevOps operations. It automates steps in the software delivery process, such as:
Automated pipelines remove manual errors, provide standardized development feedback loops, and enable fast product iterations.
A basic CI/CD pipeline process works like this:
In the traditional Jenkins, we created pipelines using “freestyle jobs” with the help of GUI. These freestyle jobs were replaced with the Jenkinsfile
, which defined the pipeline in Jenkins-specific, Groovy-based, domain-specific language (DSL). The Groovy-based pipeline came with its own set of challenges. Therefore, it was later replaced with the declarative pipeline. The declarative pipeline format is a simplified way to write Jenkinsfile
definitions. To distinguish one from the other, we call the older pipeline syntax a scripted pipeline, and the newer syntax a declarative pipeline.
In Jenkins X, pipelines are defined in the YAML format in the file jenkins-x.yml
. YAML is the golden standard for having any type of configurations and definitions, including Kubernetes. An example of a Jenkins X pipeline is given below.
extends:import: classicfile: pipeline.yamlagent:label: jenkins-gocontainer: gcr.io/jenkinsxio/builder-gopipelines:release:build:steps:- dir: envsteps:- sh: jx step helm applyname: helm-applypullRequest:build:steps:- dir: envsteps:- sh: jx step helm buildname: helm-build
Free Resources