How do I clear my Jenkins/Hudson build history?

后端 未结 14 1688
醉话见心
醉话见心 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:18

    This answer is for Jenkins

    1. Go to your Jenkins home page → Manage JenkinsScript Console

    2. Run the following script there. Change copy_folder to your project name

    Code:

    def jobName = "copy_folder"
    def job = Jenkins.instance.getItem(jobName)
    job.getBuilds().each { it.delete() }
    job.nextBuildNumber = 1
    job.save()
    

    My post

提交回复
热议问题