📜  jenkins 清除所有构建日志 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:52.697000             🧑  作者: Mango

代码示例1
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()
}