build02/nixpkgs-update: tee worker stdout and stderr to log files

This commit is contained in:
Ryan Hendrickson 2023-08-30 17:50:41 -04:00 committed by zowoq
parent 8da79f024c
commit 35e918b008

View file

@ -13,6 +13,7 @@ let
curl
getent # used by hub
cachix
apacheHttpd # for rotatelogs, used by worker script
];
nixpkgs-update-github-releases' = "${inputs.nixpkgs-update-github-releases}/main.py";
@ -47,6 +48,10 @@ let
};
script = ''
mkdir -p "$LOGS_DIRECTORY/~workers/"
exec > >(rotatelogs -eD "$LOGS_DIRECTORY"'/~workers/%Y-%m-%d-${name}.stdout.log' 86400)
exec 2> >(rotatelogs -eD "$LOGS_DIRECTORY"'/~workers/%Y-%m-%d-${name}.stderr.log' 86400 >&2)
pipe=/var/lib/nixpkgs-update/fifo
if [[ ! -p $pipe ]]; then