Skip to content

Instantly share code, notes, and snippets.

@v-thomp4
Created May 24, 2017 07:26
Show Gist options
  • Save v-thomp4/6f0daa939804aad9bc14a371632606cc to your computer and use it in GitHub Desktop.
Save v-thomp4/6f0daa939804aad9bc14a371632606cc to your computer and use it in GitHub Desktop.
clear my Jenkins/Hudson build history
def jobName = "JOB NAME"
def job = Jenkins.instance.getItem(jobName)
job.getBuilds().each { it.delete() }
job.nextBuildNumber = 1
job.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment