📅  最后修改于: 2022-03-11 14:58:52.697000             🧑  作者: Mango
Jenkins.instance.getAllItems(Job.class).each{ jobitem->
def job = Jenkins.instance.getItem(jobitem.name)
job.getBuilds().each { bh -> bh.delete() }
job.nextBuildNumber = 1
job.save()
}