From ea5a89ad5bbde65815c731e406b513e0ee6177d3 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 25 May 2018 12:20:20 +0100 Subject: [PATCH] Move output from nightly container/cloud compose to dedicated directory, cleanup older than 14 days Signed-off-by: Peter Robinson --- cloud-nightly.sh | 4 +++- docker-nightly.sh | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cloud-nightly.sh b/cloud-nightly.sh index 7ae9dbd..235b174 100755 --- a/cloud-nightly.sh +++ b/cloud-nightly.sh @@ -6,7 +6,7 @@ LABEL=$1 # to the script are passed to pungi-koji directly. shift CONFIG="fedora-cloud.conf" -TARGET_DIR="/mnt/koji/compose" +TARGET_DIR="/mnt/koji/compose/cloud" #OLD_COMPOSES_DIR="--old-composes=/mnt/fedora_koji/compose/f23 --old-composes=$TARGET_DIR" NIGHTLY="" SKIP_PHASES="--skip-phase=productimg --skip-phase=pkgset --skip-phase=gather --skip-phase=extra_files --skip-phase=creatrepo" @@ -87,3 +87,5 @@ SUBJECT='Fedora '$RELEASE' compose report: '$SHORTCOMPOSE_ID' changes' # cat $DESTDIR/logs/*verbose $DESTDIR/logs/depcheck | \ # mutt -e "set from=\"$FROM\"" -e 'set envelope_from=yes' -s "$SUBJECT" $tomail #done + +find $TARGET_DIR -xdev -depth -maxdepth 2 -mtime +14 -exec rm -rf {} \; diff --git a/docker-nightly.sh b/docker-nightly.sh index 326a187..b74561b 100755 --- a/docker-nightly.sh +++ b/docker-nightly.sh @@ -5,7 +5,7 @@ LABEL=$1 # to the script are passed to pungi-koji directly. shift CONFIG="fedora-docker.conf" -TARGET_DIR="/mnt/koji/compose" +TARGET_DIR="/mnt/koji/compose/container" #OLD_COMPOSES_DIR="--old-composes=/mnt/fedora_koji/compose/f23 --old-composes=$TARGET_DIR" NIGHTLY="" SKIP_PHASES="--skip-phase=productimg --skip-phase=pkgset --skip-phase=gather --skip-phase=extra_files --skip-phase=creatrepo" @@ -85,3 +85,5 @@ SUBJECT='Fedora '$RELEASE' compose report: '$SHORTCOMPOSE_ID' changes' # cat $DESTDIR/logs/*verbose $DESTDIR/logs/depcheck | \ # mutt -e "set from=\"$FROM\"" -e 'set envelope_from=yes' -s "$SUBJECT" $tomail #done + +find $TARGET_DIR -xdev -depth -maxdepth 2 -mtime +14 -exec rm -rf {} \;