Interview Prep/Jenkins/Pipeline design & Jenkinsfile decisions

A team insists on scripted pipelines because "declarative is too restrictive". How do you respond?

BeginnerScenarioPipeline design & Jenkinsfile decisions
Answer

Situation read → Usually they hit one limitation (dynamic stages, complex conditions) and abandoned declarative entirely.

What I'd do →

  1. Ask for the concrete limitation; most are solved with script {}, matrix, when { expression {} } or a library step.
  2. Show dynamic parallel inside a script block for runtime-generated stages.
  3. Point out what they lose with scripted: syntax validation, Restart from Stage, post conditions, consistent UI.
  4. Agree on a rule: declarative skeleton, scripted logic only in reviewed library steps.

Why → Consistency across hundreds of repos matters more than per-team freedom.

Interview tip → Frame it as a standard with escape hatches, not a ban.

All Jenkins questions Roadmap: Jenkins

More on Pipeline design & Jenkinsfile decisions