Created
August 14, 2020 07:22
-
-
Save aug2uag/812e39ff421e92650e3544398ec6a437 to your computer and use it in GitHub Desktop.
Jenkins delete all builds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def jobName = "copy_folder" | |
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