Skip to content

Commit

Permalink
HIVE-28359: Discard old builds in Jenkins to avoid disk space exhaust…
Browse files Browse the repository at this point in the history
…ion (Stamatis Zampetakis reviewed by Zoltan Haindrich)

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.

Close #5332
  • Loading branch information
zabetak committed Jul 19, 2024
1 parent 51781a8 commit 4835968
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@
* limitations under the License.
*/

def discardDaysToKeep = '365'
def discardNumToKeep = '' // Unlimited
if (env.BRANCH_NAME != 'master') {
discardDaysToKeep = '60'
discardNumToKeep = '5'
}
properties([
buildDiscarder(logRotator(daysToKeepStr: discardDaysToKeep, numToKeepStr: discardNumToKeep)),
// max 5 build/branch/day
rateLimitBuilds(throttle: [count: 5, durationName: 'day', userBoost: true]),
// do not run multiple testruns on the same branch
Expand Down

0 comments on commit 4835968

Please sign in to comment.