From 277561ae2611ca7ad84b7bad0eec2c6be5f369a0 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 26 Mar 2021 19:40:12 +0100 Subject: Jenkins: lib: move buildDiscarder settings to pipeline ~options --- vars/buildPackage.groovy | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'vars') diff --git a/vars/buildPackage.groovy b/vars/buildPackage.groovy index 343ffc66..e14106db 100644 --- a/vars/buildPackage.groovy +++ b/vars/buildPackage.groovy @@ -21,12 +21,6 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) { // - buildCmd: replace default build command "dpkg-buildpackage -uc -us -tc -b" // with this custom version - // Only keep the 10 most recent builds - def projectProperties = [ - [$class: 'BuildDiscarderProperty',strategy: [$class: 'LogRotator', numToKeepStr: '10']], - ] - - properties(projectProperties) setDescription(description) pipeline { @@ -36,6 +30,7 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) { skipDefaultCheckout() timeout(time: 120, unit: 'MINUTES') timestamps() + buildDiscarder(logRotator(numToKeepStr: '20')) } stages { stage('Define Agent') { @@ -126,8 +121,8 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) { } stage("Finalize") { agent { - label "ec2_amd64" - } + label "ec2_amd64" + } steps { script { // Unpack files for amd64 -- cgit v1.2.3