How do I clear my Jenkins/Hudson build history?

后端 未结 14 1687
醉话见心
醉话见心 2020-12-07 08:10

I recently updated the configuration of one of my hudson builds. The build history is out of sync. Is there a way to clear my build history?

Please and thank you

14条回答
  •  无人及你
    2020-12-07 08:33

    This one is the best option available.

    Jenkins.instance.getAllItems(AbstractProject.class).each {it -> Jenkins.instance.getItemByFullName(it.fullName).builds.findAll { it.number > 0 }.each { it.delete() } }
    

    This code will delete all Jenkins Job build history.

提交回复
热议问题