Skip to content

Commit

Permalink
chore(Jenkinsfile) discard old builds (5/PR and 10 on primary branch) (
Browse files Browse the repository at this point in the history
  • Loading branch information
dduportal authored Jul 5, 2023
1 parent bb59311 commit 6855f2c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
// For ci.jenkins.io
// https://github.com/jenkins-infra/documentation/blob/master/ci.adoc

properties([disableConcurrentBuilds(abortPrevious: true)])
properties([
disableConcurrentBuilds(abortPrevious: true),
buildDiscarder(logRotator(numToKeepStr: '5')),
])

if (env.BRANCH_IS_PRIMARY) {
properties([
buildDiscarder(logRotator(numToKeepStr: '50')),
buildDiscarder(logRotator(numToKeepStr: '10')),
pipelineTriggers([cron('0 18 * * 2')]),
disableConcurrentBuilds(abortPrevious: true),
])
Expand Down

0 comments on commit 6855f2c

Please sign in to comment.