Skip to content

Instantly share code, notes, and snippets.

@jaohaohsuan
Last active April 6, 2017 05:31
Show Gist options
  • Select an option

  • Save jaohaohsuan/1da208988bebab5e4a97abde26ca8db3 to your computer and use it in GitHub Desktop.

Select an option

Save jaohaohsuan/1da208988bebab5e4a97abde26ca8db3 to your computer and use it in GitHub Desktop.
delete jenkins builds
def jobName = "jenkins-master"
def job = Jenkins.instance.getItem(jobName)
job.getBuilds().each { it.delete() }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment