📅  最后修改于: 2022-03-11 14:58:57.028000             🧑  作者: Mango
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()