📜  jenkins 删除作业的所有构建 - 任何代码示例

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

代码示例1
def jobName = "KPI_Measurements/KPI_Build_delete/KPI_delete_build"  
def job = Jenkins.getInstance().getItemByFullName(jobName, Job.class)
job.getBuilds().each { it.delete() }  
job.nextBuildNumber = 1   
job.save()