diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_build_service.sh | 7 | ||||
-rwxr-xr-x | bin/reproducible_maintenance.sh | 21 |
2 files changed, 14 insertions, 14 deletions
diff --git a/bin/reproducible_build_service.sh b/bin/reproducible_build_service.sh index 0519b680..d2a78403 100755 --- a/bin/reproducible_build_service.sh +++ b/bin/reproducible_build_service.sh @@ -60,10 +60,9 @@ done while true ; do sleep 23m ; done # TODO left: -# * maintenance job needs to: -# - cleanup the log files eventually -# - check for running builds using systemctl show +# * translate yaml into a script or such to create those service files (done for i386 for now) # * logs should auto display in browser like with jenkins… (long-polling, meta-refresh, something) # - there's an NPH solution pointed out by Xtaran -# * translate yaml into a script or such to create those service files (done for i386 for now) +# * maintenance job might want to: +# - check for running builds using systemctl show diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh index 066f968c..a88c2afe 100755 --- a/bin/reproducible_maintenance.sh +++ b/bin/reproducible_maintenance.sh @@ -207,16 +207,17 @@ if [ -d /srv/workspace/pbuilder/ ] ; then fi # delete build services logfiles -if [ -d /var/lib/jenkins/userContent/reproducible/debian/build_service/ ] ; then - echo "$(date -u) - Deleting pbuilder build 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) - if [ ! -z "$OLDSTUFF" ] ; then - echo - echo "Old pbuilder build directories found 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 sudo rm -rf --one-file-system {} \; || true - echo - DIRTY=true +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) + 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 sudo rm -rf --one-file-system {} \; || true + echo + fi fi fi |