From 9ad087d09a02fc89eb9898b744bd2bfe02fe7d90 Mon Sep 17 00:00:00 2001 From: Michael Biarnes Kiefer Date: Tue, 19 Sep 2023 13:21:45 +0200 Subject: [PATCH] disabled PRs on main branch --- .../groovy/org/kie/jenkins/jobdsl/KogitoJobTemplate.groovy | 5 +++++ 1 file changed, 5 insertions(+) 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)