So far, we have worked with the classic Jenkins. We have created projects and pipelines of projects, created views to visualize the dependencies, and used various plugins to aid us with this task. In the previous chapter, we also got a taste of the Jenkins projects in code using the new Blue Ocean pipeline editor. We are not going to use Blue Ocean in this chapter, but we are going to take a better look at these pipelines using configuration as code. Just to be clear, the Blue Ocean plugin is not required to run any sample in this chapter. You can use pipelines, multibranch pipelines, and Jenkinsfiles without Blue Ocean.
Using code for your configuration has a couple of advantages. First of all, you can write your own code according to the latest standards and best practices, which allows for optimization, parameterization, and reuse. Second, code is easy to...