diff --git a/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java b/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java index bc05f413..582e499d 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java @@ -663,6 +663,11 @@ public void replaceAction(@NonNull Action a) { @Override protected void performDelete() throws IOException, InterruptedException { setDisabled(true); Jenkins.get().getQueue().cancel(this); + + for (WorkflowRun workflowRun : getBuilds()) { + workflowRun.delete(); + } + // TODO call SCM.processWorkspaceBeforeDeletion super.performDelete(); }