Skip to content

Commit

Permalink
set a default for hydra-compress-logs service
Browse files Browse the repository at this point in the history
follow up from 99ca560
  • Loading branch information
zowoq authored and Mic92 committed Sep 20, 2024
1 parent 2d79b0a commit b472f55
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 b472f55

Please sign in to comment.