clean up the cloud image composes older than 21 days

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
This commit is contained in:
Dennis Gilmore 2017-05-25 09:41:25 -05:00
parent d0944447a5
commit f2855e5f29

View File

@ -76,10 +76,10 @@ SHORTCOMPOSE_ID=$(echo $NEWCOMPOSE_ID|sed -e 's|Fedora-.*-||g')
# Set this to use later for a few items include depcheck
DESTDIR=$TARGET_DIR/$NEWCOMPOSE_ID
$RSYNCPREFIX mkdir -p $DESTDIR
# Tell interested persons that the rsync is starting (zomg!)
send_fedmsg "${fedmsg_json_start}" ${DIST} rsync.start
#send_fedmsg "${fedmsg_json_start}" ${DIST} rsync.start
#for dir in CloudImage metadata ;
# do
@ -100,3 +100,7 @@ SUBJECT='Fedora '$DIST' compose report: '$SHORTCOMPOSE_ID' changes'
# mutt -e "set from=\"$FROM\"" -e 'set envelope_from=yes' -s "$SUBJECT" $tomail
# done
#fi
# Remove old composes older than 21 days
find $TARGET_DIR/Fedora-Cloud-24-* -xdev -depth -maxdepth 2 -mtime +21 -exec rm -rf {} \;