4
votes

There is some Jenkins plugin to ZIP old builds? I don't want to package just the generated archive (I am deleting those). I want to ZIP just the log data and the data used by tools, like FindBugs, Checkstyle, Surefire, Cobertura, etc.

Currently I am running out of disk space due to Jenkins. There are some build log files that reach 50 Mb due running 3000+ unit tests (most of these are severely broken builds full of stacktraces in which everything fails). But this happens frequently in some of my projects, so I get this for every bad build. Good builds are milder and may get up to around 15 Mb, but that is still a bit costly.

The surefile XML files for these are huge too. Since they tend to contain very repetitive data, I could save a lot of disk space by zipping them. But I know no Jenkins plugin for this.

Note: I am already deleting old builds not needed anymore.

3

3 Answers

2
votes

The 'Compress Buildlog' plugin does pretty much exactly what you're asking for, for the logs themselves at least. https://github.com/daniel-beck/compress-buildlog-plugin

For everything else, you'll probably want an unconditional step after your build completes that manually applies compression to other generated files that will stick around.

2
votes

The administering Jenkins guide gives some guidance on how to do this manually. There are also links to the following plugins

The last one is really designed to backup Jenkins configuration, but there are also options for build results.

1
votes

Although this question is early 3 years ago there may be other people search the same question

here is my answer

  1. If you want to compress the current build job's log using This jenkins plugin
  2. If you want to compress the old jenkins jobs using the following script mtime +5 means the file change time is 5 days ago

    cd "$JENKINS_HOME/jobs" find * -name "log" -mtime +5|xargs gzip -9v '{}'