Interview Prep/Jenkins/Architecture, executors & JENKINS_HOME

What happens to running pipeline builds when the controller restarts?

AdvancedConceptArchitecture, executors & JENKINS_HOME
Answer

Pipelines are designed to survive a restart. The CPS program state is persisted to build.xml/program.dat, and on startup Jenkins resumes each build. Running sh steps on agents keep going because durable tasks write output to files on the agent and Jenkins reattaches. This fails if the agent also died (Kubernetes pods are often gone), if the pipeline uses PERFORMANCE_OPTIMIZED durability, or if the build had disableResume(). Use Prepare for Shutdown (/safeExit or /quietDown) to let builds finish before maintenance.

All Jenkins questions Roadmap: Jenkins

More on Architecture, executors & JENKINS_HOME