Commit 415feb9e authored by Holger Levsen's avatar Holger Levsen

reproducible Debian: delete worker console.log's older than a day

Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent 9f7103b7
......@@ -196,13 +196,13 @@ set -e
# delete build services logfiles
if [ "$HOSTNAME" = "$MAINNODE" ] ; then
if [ -d /var/lib/jenkins/userContent/reproducible/debian/build_service/ ] ; then
echo "$(date -u) - Deleting logfiles from build services directories, older than 2 days."
OLDSTUFF=$(find /var/lib/jenkins/userContent/reproducible/debian/build_service/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +1 -exec ls -lad {} \; || true)
echo "$(date -u) - Deleting logfiles from build services directories, older than a day."
OLDSTUFF=$(find /var/lib/jenkins/userContent/reproducible/debian/build_service/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +0 -exec ls -lad {} \; || true)
if [ ! -z "$OLDSTUFF" ] ; then
echo
echo "Old logfiles cleaned in /var/lib/jenkins/userContent/reproducible/debian/build_service/"
echo -n "$OLDSTUFF"
find /var/lib/jenkins/userContent/reproducible/debian/build_service/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +1 -exec rm -rf --one-file-system {} \; || true
find /var/lib/jenkins/userContent/reproducible/debian/build_service/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +0 -exec rm -rf --one-file-system {} \; || true
echo
fi
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment