From bdc7474609a2f131df7a6bc649b26f225b5464ed Mon Sep 17 00:00:00 2001 From: Marko Kaapu Date: Fri, 15 Mar 2024 17:38:09 +0200 Subject: [PATCH] Store build results and discard old build records Signed-off-by: Marko Kaapu --- ghaf-build-pipeline.groovy | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ghaf-build-pipeline.groovy b/ghaf-build-pipeline.groovy index 2f89681..88ad687 100644 --- a/ghaf-build-pipeline.groovy +++ b/ghaf-build-pipeline.groovy @@ -26,7 +26,15 @@ properties([ pipeline { agent { label 'built-in' } - options { timestamps () } + options { + timestamps () + buildDiscarder logRotator( + artifactDaysToKeepStr: '7', + artifactNumToKeepStr: '10', + daysToKeepStr: '70', + numToKeepStr: '100' + ) + } environment { // https://stackoverflow.com/questions/46680573 REPO = params.getOrDefault('REPO', DEF_GHAF_REPO) @@ -90,4 +98,9 @@ pipeline { } } } -} \ No newline at end of file + post { + always { + archiveArtifacts allowEmptyArchive: true, artifacts: 'ghaf/result-*/**' + } + } +}