Skip to content

Commit

Permalink
Merge pull request #1412 from NixOS/hydra-compress-logs
Browse files Browse the repository at this point in the history
set a default for hydra-compress-logs service
  • Loading branch information
Mic92 committed Sep 20, 2024
2 parents c61bdd2 + b472f55 commit 44248d3
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 @@ -464,10 +464,12 @@ in
''
set -eou pipefail
compression=$(sed -nr 's/compress_build_logs_compression = ()/\1/p' ${baseDir}/hydra.conf)
if [[ $compression == zstd ]]; then
if [[ $compression == "" ]]; then
compression="bzip2"
elif [[ $compression == zstd ]]; then
compression="zstd --rm"
fi
find ${baseDir}/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r $compression --force --quiet
find ${baseDir}/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r "$compression" --force --quiet
'';
startAt = "Sun 01:45";
};
Expand Down

0 comments on commit 44248d3

Please sign in to comment.