Hi James, I think the Log Rotator Plugin does what you're looking for. Check out https://github.com/jenkinsci/job-dsl-plugin/wiki/The-Configure-Block
Steffen From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] On Behalf Of James Green Sent: Thursday, July 20, 2017 6:38 PM To: jenkinsci-users@googlegroups.com Subject: Discard old build artifacts? I don't want to remove the entire job - having the logs of what the SCM commit was and build output logs is really useful alongside the Jenkins build number. But I'm generating gigs of artifacts that I don't need. Is there a way of discarding these within a Jenkinsfile? Thanks, James -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2BawDBdLSg4x7k4BhF--sFDHMMxx%2Ba%2BNyx79a-qkzwgZC8A%40mail.gmail.com<https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2BawDBdLSg4x7k4BhF--sFDHMMxx%2Ba%2BNyx79a-qkzwgZC8A%40mail.gmail.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5E63738AB9896844AF1601A1D094677317A719F6%40SMBXKO1.cgm.ag. For more options, visit https://groups.google.com/d/optout.