Jenkins是否有办法强制内部编号从199开始?
由于我们已使用巡航控制多年,我希望如果可能的话,编号将从那里继续。
答案 0 :(得分:0)
请参见此处:https://stackoverflow.com/a/49053851/1662268
resetNumberTarget = 14
item = Jenkins.instance.getItemByFullName("Project Name [from project Dashboard]")
//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)