From f2855e5f291de40ea7b1bb1954cf124a068ec59b Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: May 25 2017 14:41:25 +0000 Subject: clean up the cloud image composes older than 21 days Signed-off-by: Dennis Gilmore --- diff --git a/cloud-nightly.sh b/cloud-nightly.sh index 4cee9a1..93cfe2c 100755 --- a/cloud-nightly.sh +++ b/cloud-nightly.sh @@ -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 {} \;