Jenkins服务器运行时间长了CPU占用始终100%,重启也解决不了,用以下脚本删除所有构建记录解决问题
Jenkins.instance.getItems().each {
it.getItems().each() {
println(it.getFullName())
it.getBuilds().each{ it.delete() }
//it.nextBuildNumber = 1
//it.save()
}
}