From ba94d6f11d5f3e5e92755d14272aeef35b156429 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Fri, 20 Mar 2015 20:22:34 +0100 Subject: eproducible: support for saving artifacts from the builds. use 'artifacts' as the first package when manual scheduling and packages will save files! --- bin/reproducible_maintainance.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'bin/reproducible_maintainance.sh') diff --git a/bin/reproducible_maintainance.sh b/bin/reproducible_maintainance.sh index 84624bb6..97e588d2 100755 --- a/bin/reproducible_maintainance.sh +++ b/bin/reproducible_maintainance.sh @@ -101,7 +101,8 @@ if [ ! -z "$FAILED_BUILDS" ] ; then check_candidates if [ $TOTAL -ne 0 ] ; then echo " - in $SUITE: $CANDIDATES" - schedule_packages $PACKAGE_IDS + # '0' here means the artifacts will not be saved + schedule_packages 0 $PACKAGE_IDS fi done DIRTY=true @@ -200,6 +201,15 @@ if [ ! -z "$OLDSTUFF" ] ; then echo fi +# remove artifacts older than 3 days +mkdir -p /var/lib/jenkins/userContent/artifacts +ARTIFACTS=$(find /var/lib/jenkins/userContent/artifacts -maxdepth 1 -type d -mtime +3 -exec rm -rv {} \;) +if [ ! -z "$ARTIFACTS" ] ; then + echo + echo "Removed $ARTIFACTS artifacts." + echo +fi + if ! $DIRTY ; then echo "Everything seems to be fine." echo -- cgit v1.2.3-70-g09d2