From e753af0e76ff48bb67eb1949aaaaa6c6d40e982d Mon Sep 17 00:00:00 2001 From: Tristan Radisson Date: Fri, 25 Aug 2023 10:49:51 +0200 Subject: [PATCH 1/2] Quarkus 3: Disable `kie-jpmml-integration` calls --- .ci/jenkins/project/Jenkinsfile.nightly | 7 +++++++ .ci/jenkins/project/Jenkinsfile.release | 9 ++++++++- .ci/jenkins/project/Jenkinsfile.setup-branch | 7 +++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.ci/jenkins/project/Jenkinsfile.nightly b/.ci/jenkins/project/Jenkinsfile.nightly index a03ad66e849..0adec73e6af 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 { 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..dd59789804c 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 { 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..400a95b6db5 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 { 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' +} From a243ca870dd43972660c74b0b0feedabc3067745 Mon Sep 17 00:00:00 2001 From: Tristan Radisson Date: Fri, 25 Aug 2023 11:03:29 +0200 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Andrea Lamparelli --- .ci/jenkins/project/Jenkinsfile.nightly | 2 +- .ci/jenkins/project/Jenkinsfile.release | 2 +- .ci/jenkins/project/Jenkinsfile.setup-branch | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/jenkins/project/Jenkinsfile.nightly b/.ci/jenkins/project/Jenkinsfile.nightly index 0adec73e6af..ea098f73ece 100644 --- a/.ci/jenkins/project/Jenkinsfile.nightly +++ b/.ci/jenkins/project/Jenkinsfile.nightly @@ -62,7 +62,7 @@ pipeline { } stage('Build & Deploy KIE jpmml integration') { when { - expression { isMainStream() } + expression { return isMainStream() } } steps { script { diff --git a/.ci/jenkins/project/Jenkinsfile.release b/.ci/jenkins/project/Jenkinsfile.release index dd59789804c..b92ee124407 100644 --- a/.ci/jenkins/project/Jenkinsfile.release +++ b/.ci/jenkins/project/Jenkinsfile.release @@ -74,7 +74,7 @@ pipeline { stage('Build & Deploy KIE jpmml integration') { when { - expression { isMainStream() } + expression { return isMainStream() } } steps { script { diff --git a/.ci/jenkins/project/Jenkinsfile.setup-branch b/.ci/jenkins/project/Jenkinsfile.setup-branch index 400a95b6db5..512d85b2eb4 100644 --- a/.ci/jenkins/project/Jenkinsfile.setup-branch +++ b/.ci/jenkins/project/Jenkinsfile.setup-branch @@ -64,7 +64,7 @@ pipeline { stage('Init KIE jpmml integration') { when { - expression { isMainStream() } + expression { return isMainStream() } } steps { script {