[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Debian: reduce number of cron mails for rsyncing .buildinfo files from 8 to 1 per day
Holger Levsen
gitlab at salsa.debian.org
Wed May 8 23:05:25 BST 2019
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
40571647 by Holger Levsen at 2019-05-08T21:56:11Z
reproducible Debian: reduce number of cron mails for rsyncing .buildinfo files from 8 to 1 per day
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/rsync2buildinfos.debian.net
Changes:
=====================================
bin/rsync2buildinfos.debian.net
=====================================
@@ -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
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/4057164740ae1f9ede00c07d1e147cc89afece12
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/4057164740ae1f9ede00c07d1e147cc89afece12
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20190508/d0b78b27/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list