Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ import org.monetate.Slack
def slack = new Slack(steps, REPO_NAME)

// Abort superseded builds on non-mainline branches; mainline (master/main/patch-*) builds every commit.
if (!isMainlineBranch()) {
// Both day and count caps are required -- a day-only rotator keeps every build a busy
// job produces inside the window, which is unbounded disk on the controller.
if (isMainlineBranch()) {
properties([
buildDiscarder(logRotator(daysToKeepStr: '60', numToKeepStr: '100')),
])
} else {
properties([
buildDiscarder(logRotator(daysToKeepStr: '30', numToKeepStr: '5')),
disableConcurrentBuilds(abortPrevious: true),
])
}
Expand Down