def jobName = "item_name"
def maxNumber = 100
Jenkins.instance.getItemByFullName(jobName).builds.findAll {
it.number <= maxNumber
}.each {
it.delete()
}
❤️ 转载文章请注明出处,谢谢!❤️
def jobName = "item_name"
def maxNumber = 100
Jenkins.instance.getItemByFullName(jobName).builds.findAll {
it.number <= maxNumber
}.each {
it.delete()
}