Commit 40571647 authored by Holger Levsen's avatar Holger Levsen

reproducible Debian: reduce number of cron mails for rsyncing .buildinfo files from 8 to 1 per day

Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent bb9b49f2
......@@ -19,17 +19,21 @@ DAY="$(date -u +%d)"
TARGETHOST="profitbricks-build7-amd64.debian.net"
TARGETDIR="/var/lib/jenkins/userContent/reproducible/debian/ftp-master.debian.org/buildinfo"
SOURCEDIR="/srv/ftp-master.debian.org/buildinfo/"
LOG="~/rsync-$YEAR-$MONTH-$DAY.log"
rsync_day(){
rsync -e ssh -av $YEAR/$MONTH/$DAY jenkins@$TARGETHOST:$TARGETDIR/$YEAR/$MONTH/
echo "$(date -u) - rsyncing .buildinfo files for $YEAR/$MONTH/$DAY..." >> $LOG
rsync -e ssh -av $YEAR/$MONTH/$DAY jenkins@$TARGETHOST:$TARGETDIR/$YEAR/$MONTH/ >> $LOG 2>&1
}
rsync_month(){
rsync -e ssh -av $YEAR/$MONTH jenkins@$TARGETHOST:$TARGETDIR/$YEAR/
echo "$(date -u) - rsyncing .buildinfo files for $YEAR/$MONTH..." >> $LOG
rsync -e ssh -av $YEAR/$MONTH jenkins@$TARGETHOST:$TARGETDIR/$YEAR/ >> $LOG 2>&1
}
rsync_year(){
rsync -e ssh -av $YEAR jenkins@$TARGETHOST:$TARGETDIR/
echo "$(date -u) - rsyncing .buildinfo files for $YEAR..." >> $LOG
rsync -e ssh -av $YEAR jenkins@$TARGETHOST:$TARGETDIR/ >> $LOG 2>&1
}
#
......@@ -56,4 +60,11 @@ else
MONTH="$(date -u -d '1 day ago' +%m)"
DAY="$(date -u -d '1 day ago' +%d)"
rsync_day
# output yesterdays logfile if this hasn't been done yet
OLDLOG="~/rsync-$YEAR-$MONTH-$DAY.log"
if [ -f "$OLDLOG" ] ; then
cat $OLDLOG
echo "$(date -u) - $OLDLOG flushed via cron output." >> $LOG
rm $OLDLOG
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