文章目录
  1. Jenkins -> Manage Jenkins
  2. 脚本命令行

执行:

    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)
文章目录