jenkins重置jop的buildNum
文章目录
- Jenkins -> Manage Jenkins
- 脚本命令行
执行:
resetNumberTarget = 1
item = Jenkins.instance.getItemByFullName("run-bzy-hotel")
//println(item)
item.builds.each() { build ->
//println(build)
//println(build.number)
if(build.number >= resetNumberTarget)
{
println("About to Delete '" + build + "'")
build.delete()
}
}
item.updateNextBuildNumber(resetNumberTarget)