| Jesse Glick Sorry, I didn't add the context. It is not meant to be a generic Pipeline script to serve multiple and different jobs. The jobs in question are all the same job in principle, doing the same thing, just for a different branch. We could just as well have the Jenkinsfile configured as a Multibranch Pipeline or even Github Organisation job. A little off topic, but the cOption thing is simply a way to set some defaults (for the buildDiscarder task for example) based on the BRANCH_NAME. This is possible for stages within the pipeline itself using the "when ... expression" but not at the configuration level. So whilst we can say "if on release_branch then archive these artifacts (else do not)", we can't say "if on release_branch then keep all the build history else only keep the last 30 builds and artifacts of the last 10 builds". It's either have all your branches save all the build history, or accept losing some of your release branches build history. Following this, it makes sense to allow the disableConcurrentBuilds to accept a boolean in the same way skipDefaultCheckout does. Having an optional boolean would allow this to be configured rather than being static statement. |