summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_maintenance.sh
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-28 23:22:14 +0200
committerMattia Rizzolo <mattia@mapreri.org>2015-04-28 23:39:07 +0200
commited915317fcd79b719330d77f98e8378e27334636 (patch)
tree68aca2803be1c8bfc99b826cf4ebb902d4d0327e /bin/reproducible_maintenance.sh
parent7e1ccca464a1a007370503fba14a70a9d09e2f6a (diff)
downloadjenkins.debian.net-ed915317fcd79b719330d77f98e8378e27334636.tar.xz
reproducible: sed everything to use that $BASE variable instead of hardcoding /var/lib/jenkins/userContent (that's about to change rather soon)
Diffstat (limited to 'bin/reproducible_maintenance.sh')
-rwxr-xr-xbin/reproducible_maintenance.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index 8732f562..098e63db 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -34,7 +34,7 @@ if [ ! -f reproducible_$DATE.db.xz ] ; then
fi
# provide copy for external backups
-cp -v $PACKAGES_DB /var/lib/jenkins/userContent/
+cp -v $PACKAGES_DB $BASE/
# delete old temp directories
OLDSTUFF=$(find $REP_RESULTS -maxdepth 1 -type d -name "tmp.*" -mtime +2 -exec ls -lad {} \;)
@@ -97,7 +97,7 @@ fi
# only grep through the last 5h (300 minutes) of builds...
# (ignore "*None.rbuild.log" because these are build which were just started)
# this job runs every 4h
-FAILED_BUILDS=$(find /var/lib/jenkins/userContent/rbuild -type f ! -name "*None.rbuild.log" ! -mmin +300 -exec egrep -l -e 'E: Failed to fetch.*(Connection failed|Size mismatch|Cannot initiate the connection to)' {} \; || true)
+FAILED_BUILDS=$(find $BASE/rbuild -type f ! -name "*None.rbuild.log" ! -mmin +300 -exec egrep -l -e 'E: Failed to fetch.*(Connection failed|Size mismatch|Cannot initiate the connection to)' {} \; || true)
if [ ! -z "$FAILED_BUILDS" ] ; then
echo
echo "Warning: the following failed builds have been found"
@@ -201,7 +201,7 @@ if grep -q '|' $PACKAGES ; then
QUERY="DELETE FROM removed_packages
WHERE name='$PKGNAME' AND suite='$SUITE' AND architecture='$ARCH'"
sqlite3 -init $INIT ${PACKAGES_DB} "$QUERY"
- cd /var/lib/jenkins/userContent
+ cd $BASE
find rb-pkg/$SUITE/$ARCH rbuild/$SUITE/$ARCH dbd/$SUITE/$ARCH buildinfo/$SUITE/$ARCH -name "${PKGNAME}_*" | xargs rm -v
done
cd - > /dev/null
@@ -218,16 +218,16 @@ if [ ! -z "$OLDSTUFF" ] ; then
fi
# remove artifacts older than 3 days
-ARTIFACTS=$(find /var/lib/jenkins/userContent/artifacts/* -maxdepth 1 -type d -mtime +3 -exec ls -lad {} \; || true)
+ARTIFACTS=$(find $BASE/artifacts/* -maxdepth 1 -type d -mtime +3 -exec ls -lad {} \; || true)
if [ ! -z "$ARTIFACTS" ] ; then
echo
echo "Removed old artifacts:"
- find /var/lib/jenkins/userContent/artifacts/* -maxdepth 1 -type d -mtime +3 -exec rm -rv {} \;
+ find $BASE/artifacts/* -maxdepth 1 -type d -mtime +3 -exec rm -rv {} \;
echo
fi
# find + chmod files with bad permissions
-BADPERMS=$(find /var/lib/jenkins/userContent/{buildinfo,dbd,rbuild,artifacts,unstable,experimental,testing,rb-pkg} ! -perm 644 -type f)
+BADPERMS=$(find $BASE/{buildinfo,dbd,rbuild,artifacts,unstable,experimental,testing,rb-pkg} ! -perm 644 -type f)
if [ ! -z "$BADPERMS" ] ; then
DIRTY=true
echo