What is "Restart from Stage" and when does it not work?
IntermediateConceptScripted pipeline, Groovy & CPS
Answer
For completed declarative builds, you can rerun from a chosen top-level stage, reusing the earlier stages' results. It does not work for scripted pipelines, for stages nested inside parallel or matrix (you restart the parent), and the workspace is not preserved; stashes are only available if options { preserveStashes(buildCount: 5) } was set. It is good for retrying a failed deploy without rebuilding.
More on Scripted pipeline, Groovy & CPS
What does a scripted pipeline look like and when would you still write one?IntermediateWhat is CPS and why does Jenkins transform pipeline Groovy?AdvancedWhy does `java.io.NotSerializableException` happen in pipelines?AdvancedWhat does `@NonCPS` do and what are its rules?AdvancedWhy do some Groovy closures behave unexpectedly in pipelines, for example `list.each { }` or `sort`?AdvancedWhat is the `script` block in declarative, and what are its limits?Beginner