diff --git a/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobTemplate.groovy b/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobTemplate.groovy index e4b84a259..648aa0740 100644 --- a/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobTemplate.groovy +++ b/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobTemplate.groovy @@ -195,6 +195,11 @@ class KogitoJobTemplate { def job = createPipelineJob(script, jobParams) job?.with { + + if (Utils.isMainBranch(script)){ + disabled() + } + // Redefine to keep days instead of number of builds logRotator { daysToKeep(10)