Last active
April 3, 2017 21:26
-
-
Save christ66/5f39a0a0a7f899a270a54c18af00c358 to your computer and use it in GitHub Desktop.
Discard old builds for all projects - Jenkins
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 daysToKeep = 0 | |
def numToKeep = 0 | |
def artifactDaysToKeep = 0 | |
def artifactNumToKeep = 0 | |
Jenkins.instance.getAllItems(AbstractProject.class).each{ it -> | |
it.setBuildDiscarder(new LogRotator(daysToKeep, numToKeep, artifactDaysToKeep, artifactNumToKeep)) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment