diff --git a/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java b/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java index 49b92373..8ec152b1 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java @@ -1022,10 +1022,12 @@ private final class GraphL implements GraphListener { if (node instanceof FlowEndNode) { finish(((FlowEndNode) node).getResult(), execution != null ? execution.getCauseOfFailure() : null); } else { - try { - save(); - } catch (IOException x) { - LOGGER.log(Level.WARNING, null, x); + if (execution != null && execution.getDurabilityHint().isPersistWithEveryStep()) { + try { + save(); + } catch (IOException x) { + LOGGER.log(Level.WARNING, null, x); + } } } }