Interview Prep/Jenkins/Scripted pipeline, Groovy & CPS

What is pipeline durability and what are the three durability hints?

AdvancedConceptScripted pipeline, Groovy & CPS
Answer

Durability controls how often the pipeline state is written to disk.

Hint Behaviour
MAX_SURVIVABILITY Writes after every step; safest, most disk I/O
SURVIVABLE_NONATOMIC Writes every step but non-atomically
PERFORMANCE_OPTIMIZED Writes only at certain points; much less I/O, but a crash can lose the running build

Set per pipeline with options { durabilityHint('PERFORMANCE_OPTIMIZED') } or globally. We use performance-optimized for most CI pipelines (rerun is cheap) and max survivability for long release pipelines.

All Jenkins questions Roadmap: Jenkins

More on Scripted pipeline, Groovy & CPS