Script Console 中输入如下的脚本
def jobName = "picEachBackUP"
def maxNumber = 100
Jenkins.instance.getItemByFullName(jobName).builds.findAll {
it.number <= maxNumber
}.each {
it.delete()
}
Script Console 中输入如下的脚本
def jobName = "picEachBackUP"
def maxNumber = 100
Jenkins.instance.getItemByFullName(jobName).builds.findAll {
it.number <= maxNumber
}.each {
it.delete()
}