diff --git a/.ci/jenkins/project/Jenkinsfile.nightly b/.ci/jenkins/project/Jenkinsfile.nightly index a03ad66e849..ea098f73ece 100644 --- a/.ci/jenkins/project/Jenkinsfile.nightly +++ b/.ci/jenkins/project/Jenkinsfile.nightly @@ -61,6 +61,9 @@ pipeline { } } stage('Build & Deploy KIE jpmml integration') { + when { + expression { return isMainStream() } + } steps { script { def buildParams = getDefaultBuildParams() @@ -169,3 +172,7 @@ void addBooleanParam(List buildParams, String key, boolean value) { String getBuildBranch() { return env.GIT_BRANCH_NAME } + +boolean isMainStream() { + return env.STREAM == 'main' +} diff --git a/.ci/jenkins/project/Jenkinsfile.release b/.ci/jenkins/project/Jenkinsfile.release index 6db923a0b74..b92ee124407 100644 --- a/.ci/jenkins/project/Jenkinsfile.release +++ b/.ci/jenkins/project/Jenkinsfile.release @@ -73,6 +73,9 @@ pipeline { } stage('Build & Deploy KIE jpmml integration') { + when { + expression { return isMainStream() } + } steps { script { def buildParams = getDefaultBuildParams() @@ -128,7 +131,7 @@ pipeline { stage('Promote KIE jpmml integration') { when { - expression { return isJobConsideredOk(getDeployJobName(kieJpmmlIntegrationRepo)) } + expression { return isMainStream() && isJobConsideredOk(getDeployJobName(kieJpmmlIntegrationRepo)) } } steps { script { @@ -407,3 +410,7 @@ boolean areArtifactsReleased() { void setArtifactsReleased() { setReleasePropertyIfneeded(ARTIFACTS_RELEASE_STAGE, true) } + +boolean isMainStream() { + return env.STREAM == 'main' +} diff --git a/.ci/jenkins/project/Jenkinsfile.setup-branch b/.ci/jenkins/project/Jenkinsfile.setup-branch index 8a2cd653d73..512d85b2eb4 100644 --- a/.ci/jenkins/project/Jenkinsfile.setup-branch +++ b/.ci/jenkins/project/Jenkinsfile.setup-branch @@ -63,6 +63,9 @@ pipeline { } stage('Init KIE jpmml integration') { + when { + expression { return isMainStream() } + } steps { script { def buildParams = getDefaultBuildParams() @@ -194,3 +197,7 @@ String getVersionFromReleaseBranch(String releaseBranch, int microVersion = 0, S error 'Cannot parse given branch as a release branch, aka [M].[m].x ...' } } + +boolean isMainStream() { + return env.STREAM == 'main' +}