Skip to content

Commit

Permalink
Disable concurrent builds to reduce memory usage
Browse files Browse the repository at this point in the history
As described in the issue #1343 builds get killed by the OOM killer
sometimes.

Add lock('iis-build') to the build options to reduce
memory usage whem multiple builds are triggered.
As described eg. in https://issues.jenkins.io/browse/JENKINS-35359
the disableConcurrentBuilds option can only prevent concurrent builds
of a single branch and using locks is the recommended workaround
for serializing all the builds in a multibranch pipeline.
  • Loading branch information
mpol committed Apr 25, 2022
1 parent 6b057f9 commit 33869d0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Jenkinsfile.dockerized
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pipeline {
options {
buildDiscarder(logRotator(numToKeepStr: '5'))
timeout time: 60, unit: 'MINUTES'
lock('iis-build')
}

environment {
Expand Down

0 comments on commit 33869d0

Please sign in to comment.