BookNest's pipeline is a straight line: check out, test, build the image, push. Declarative fits it. The linter catches mistakes before a build starts, post, when, options and input replace hand-written try/catch and if, the graph always matches the source, and anyone on the team can read it. Scripted earns its place where the shape of the pipeline is computed, such as one branch per changed service in a monorepo, and inside shared libraries, which are Groovy anyway. Jenkins 8,793 ' own documentation recommends Declarative for new pipelines, and the rest of this chapter uses it, with an occasional script block.
MENU
Declarative for BookNest
Choosing Declarative Over Scripted for BookNest