Skip to content

Commit

Permalink
Use configured compression in hydra-compress-logs service
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Aug 9, 2024
1 parent fbd9243 commit 3193a74
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nixos-modules/hydra.nix
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,12 @@ in
# logs automatically after a step finishes, but this doesn't work
# if the queue runner is stopped prematurely.
systemd.services.hydra-compress-logs =
{ path = [ pkgs.bzip2 ];
{ path = [ pkgs.bzip2 pkgs.zstd ];
script =
''
find ${baseDir}/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r bzip2 -v -f
set -eou pipefail
compression=$(sed -nr 's/compress_build_logs_compression = ()/\1/p' ${baseDir}/hydra.conf)
find ${baseDir}/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r $compression -v -f
'';
startAt = "Sun 01:45";
};
Expand Down

0 comments on commit 3193a74

Please sign in to comment.