From 76ef053a93e94bc1854edd1409bdb97bda802218 Mon Sep 17 00:00:00 2001 From: Stamatis Zampetakis Date: Wed, 3 Jul 2024 13:59:19 +0200 Subject: [PATCH] HIVE-28359: Discard old builds in Jenkins to avoid disk space exhaustion Currently Jenkins retains the builds from all active branches/PRs leading to disk space exhaustion and CI failures requiring manual intervention to restore the services. --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index fc11bb3299ea..fe54ebc814fd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,6 +17,9 @@ */ properties([ + // For master keep all builds for one year + // For other branches/PRs keep at most 5 builds for at most two months + buildDiscarder(logRotator(daysToKeepStr: env.BRANCH_NAME=='master'?'365':'60', numToKeepStr: env.BRANCH_NAME=='master'?'':'5')) // max 5 build/branch/day rateLimitBuilds(throttle: [count: 5, durationName: 'day', userBoost: true]), // do not run multiple testruns on the same branch