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
Use the script console (Manage Jenkins > Script Console) and something like this script to bulk delete a job's build history https://github.com/jenkinsci/jenkins-scripts/blob/master/scriptler/bulkDeleteBuilds.groovy
That script assumes you want to only delete a range of builds. To delete all builds for a given job, use this (tested):
// change this variable to match the name of the job whose builds you want to delete def jobName = "Your Job Name" def job = Jenkins.instance.getItem(jobName) job.getBuilds().each { it.delete() } // uncomment these lines to reset the build number to 1: //job.nextBuildNumber = 1 //job.save()
1.4m articles
1.4m replys
5 comments
57.0k users