Last active
May 31, 2016 17:17
-
-
Save trecloux/1d0b5557692dc2932e00e2b4f99c670e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import hudson.model.* | |
import hudson.tasks.* | |
for(item in Hudson.instance.items) { | |
print("job "+item.name) | |
item.buildDiscarder = new LogRotator(-1, 5, -1, -1) | |
println (" configured") | |
} | |
for(item in Hudson.instance.items) { | |
print("job "+item.name) | |
try { | |
item.logRotate() | |
println (" rotated") | |
} catch (IOException e) { | |
println("################### FAILED" + e.message) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment