From b2cb19190e2b51a7472727479a93f8a9d7e58a93 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Fri, 20 May 2016 08:21:55 +0200 Subject: [PATCH] [Jenkins] Discard old builds in pipeline jobs. --- scripts/jenkins/clang.groovy | 2 ++ scripts/jenkins/coverage.groovy | 2 ++ scripts/jenkins/gcc.groovy | 2 ++ 3 files changed, 6 insertions(+) diff --git a/scripts/jenkins/clang.groovy b/scripts/jenkins/clang.groovy index d7cc15d923b..daf9b601a5c 100644 --- a/scripts/jenkins/clang.groovy +++ b/scripts/jenkins/clang.groovy @@ -42,3 +42,5 @@ def build(buildDir, cmakeOptions, target) { stage 'Build' sh "cd ${buildDir} && make -j \$(nproc) ${target}" } + +properties [[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '25']]] diff --git a/scripts/jenkins/coverage.groovy b/scripts/jenkins/coverage.groovy index 66a191a2657..37d49c70091 100644 --- a/scripts/jenkins/coverage.groovy +++ b/scripts/jenkins/coverage.groovy @@ -26,3 +26,5 @@ def build(buildDir, cmakeOptions, target) { stage 'Build' sh "cd ${buildDir} && make -j \$(nproc) ${target}" } + +properties [[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '1', daysToKeepStr: '', numToKeepStr: '5']]] diff --git a/scripts/jenkins/gcc.groovy b/scripts/jenkins/gcc.groovy index e81488d3385..cc038c470e3 100644 --- a/scripts/jenkins/gcc.groovy +++ b/scripts/jenkins/gcc.groovy @@ -54,3 +54,5 @@ def publishTestReports(ctestPattern, gtestPattern, parseRulefile) { step([$class: 'GitHubCommitNotifier', resultOnFailure: 'FAILURE', statusMessage: [content: 'Finished Jenkins gcc build']]) } + +properties [[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '25']]] -- GitLab