diff options
author | Holger Levsen <holger@layer-acht.org> | 2017-06-19 21:03:14 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2017-06-19 21:03:14 +0200 |
commit | 7930817c97f18e0941dbccd4b395e29b7cec25cd (patch) | |
tree | b0ae26197ff0c8d0aab7c9a1ebe58b23e22962d2 /bin/reproducible_maintenance.sh | |
parent | dfea843e7d9580cfbedeb783631ae2efce92e648 (diff) | |
download | jenkins.debian.net-7930817c97f18e0941dbccd4b395e29b7cec25cd.tar.xz |
reproducible Debian: only keep build_service logs for 2 days
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin/reproducible_maintenance.sh')
-rwxr-xr-x | bin/reproducible_maintenance.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh index 3e508523..afc6a407 100755 --- a/bin/reproducible_maintenance.sh +++ b/bin/reproducible_maintenance.sh @@ -168,13 +168,13 @@ fi # 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 3 days." - OLDSTUFF=$(find /var/lib/jenkins/userContent/reproducible/debian/build_service/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +2 -exec ls -lad {} \; || true) + 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) 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 +2 -exec rm -rf --one-file-system {} \; || true + 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 echo fi fi |