How Deep Do We Know Jenkins?

Daniel Delimata
3 min readMay 28, 2023

When it comes to continuous integration and continuous delivery (CI/CD) processes, Jenkins has become an indispensable tool for software development teams. In this article, we will dive deep into Jenkins and explore some of its various aspects, functionalities, and benefits.

LEVELS OF AUTOMATED JOBS DESCRIPTION IN JENKINS

Jenkins is a powerful automation tool that is widely used in software development. It provides several levels of job description, from basic to advanced, to suit the needs of different teams and projects.

  1. Basic Job Description: This level of job description is the simplest way to create and run jobs in Jenkins. It is performed through the user interface, where users can create and configure jobs by clicking on the buttons and options provided by Jenkins. This is suitable for simple projects or for teams that are new to Jenkins.
  2. Pipeline Job Description: This level of job description is more advanced than the basic level and allows users to create and run jobs using a Jenkinsfile. A Jenkinsfile is a script that defines the steps required to build and test the software. This level is also called “scripted” level. This approach is suitable for projects that have a complex build and test process and require more control over the job execution.
  3. Declarative Pipeline Job Description: This level of job description is an extension of the pipeline level and uses a simpler, more declarative syntax. Declarative pipeline jobs are defined using a Jenkinsfile that is written in a specific format. This level is more maintainable and readable in comparison to scripted level. This approach is suitable for projects that have a complex build and test process and require more control over the job execution.
  4. Job DSL Job Description: This level of job description is the most advanced level and allows users to create and configure jobs using a domain-specific language (DSL). The Job DSL plugin provides a simple, yet powerful, way to create and configure Jenkins jobs. This level is also called “DSL defined” level. This approach is suitable for teams that need to create and manage many jobs, and want to automate the process of creating and configuring those jobs.

BENEFITS OF DSL

Let us assume that you have hundreds of Jenkinsfile-based jobs. Now imagine that you want to migrate your repository to another address. It may be necessary to manually change the URL in every job. With DSL, you could do it with one simple search-replace action and commit.

Another advantage is visible when we imagine that some changes were made in a more general setting, and we do not know who made the specific change, when it was made, and even what the previous settings were. Having everything in the repository will solve these problems.

NO ADMIN — ALL ADMIN

With DSL, we have the possibility to completely remove admin rights. At first, this idea seems crazy. But think about it. Do you need admin rights when everything can be changed by committing changes to the repository and just restarting the whole environment?

In such an approach, the whole team may have equal rights to propose changes and to review propositions of other team members.

The story was originally created by me, but it may contain parts that were created with AI assistance. My original text has been corrected and partially rephrased by Chat Generative Pre-trained Transformer to improve the language.

--

--