# HG changeset patch # User domruf # Date 2017-09-20 21:08:35 # Node ID 58713c2ebfff82815c9e2dccac3250b0218b9f9e # Parent 0acb4676388614a9bc93918679092b5d4134b64e jenkinsfile: only keep the artifacts (test result xml files) of the last 10 builds diff --git a/Jenkinsfile b/Jenkinsfile --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,6 +2,12 @@ def createvirtualenv = '' def activatevirtualenv = '' node { + properties([[$class: 'BuildDiscarderProperty', + strategy: [$class: 'LogRotator', + artifactDaysToKeepStr: '', + artifactNumToKeepStr: '10', + daysToKeepStr: '', + numToKeepStr: '']]]); if (isUnix()) { createvirtualenv = 'rm -r $JENKINS_HOME/venv/$JOB_NAME || true && virtualenv $JENKINS_HOME/venv/$JOB_NAME' activatevirtualenv = '. $JENKINS_HOME/venv/$JOB_NAME/bin/activate'