java - Jenkins: Deleting Old Builds -


how delete old jenkins builds manually? used discard old builds plugin , set keep last 10 builds. not working , keeping 13 builds. there proper way manually build numbers [#1 #2 ...etc] reorganised?

if don't mind scripting deletion algorithm yourself, can create in groovy postbuild.

for example, if wanted keep last 10 builds , delete rest, copy , paste 1 liner in groovy postbuild step:

manager.build.parent.builds.drop(10).each { it.delete() } 

what's approach have full control on how things deleted. example, fancy delete builds based on logarithmic approach older builds dropping off faster newer ones.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -