linuxjenkins

How to keep only red builds in jenkins


How to keep only the failed builds logs in a job history?

I haven't enough disk space to store both successful and failed builds. I'm looking for a simple way to keep all the red one's logs and none of the blue/green on a Linux jenkins. (Perhaps with a Post-build Action?)


Solution

  • The Discard Old Build plugin can do that for you:

    From the link:

    After installing this plugin, a new post-build step named 'Discard Old Builds' appears.