This is an automated email from the ASF dual-hosted git repository.

Kusuma04-dev pushed a commit to branch test_10.3.x
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git


The following commit(s) were added to refs/heads/test_10.3.x by this push:
     new 770216d599a tests
770216d599a is described below

commit 770216d599a723eb39e916e8cc192e819cb1b572
Author: Kusuma <[email protected]>
AuthorDate: Thu Oct 22 11:22:39 2026 +0530

    tests
---
 .ci/jenkins/Jenkinsfile.103xplus.release-candidate | 57 +++++++++++++++++++++-
 1 file changed, 56 insertions(+), 1 deletion(-)

diff --git a/.ci/jenkins/Jenkinsfile.103xplus.release-candidate 
b/.ci/jenkins/Jenkinsfile.103xplus.release-candidate
index c2281d53db7..dab905c561e 100644
--- a/.ci/jenkins/Jenkinsfile.103xplus.release-candidate
+++ b/.ci/jenkins/Jenkinsfile.103xplus.release-candidate
@@ -53,9 +53,19 @@ pipeline {
         )
         string(
             name: 'BASE_REF',
-            description: 'Git branch or tag to release from',
+            description: 'Git branch or tag to release from. When 
CREATE_STREAM_BRANCH=true this is the branch the new X.Y.x stream branch is cut 
from (normally main)',
             defaultValue: 'main'
         )
+        booleanParam(
+            name: 'CREATE_STREAM_BRANCH',
+            description: 'Branch cut: create X.Y.x (derived from 
RELEASE_VERSION) from BASE_REF, set X.Y.999 / X.Y.999-SNAPSHOT / stream name 
X.Y.x, push it, then build the RC from it. Only for the first RC of a new minor 
(e.g. 10.3.0-rc1). Fails if X.Y.x already exists',
+            defaultValue: false
+        )
+        booleanParam(
+            name: 'UPDATE_CI_IMAGE_TAG',
+            description: 'Only used with CREATE_STREAM_BRANCH=true. Also point 
every Jenkinsfile at docker.io/apache/incubator-kie-tools-ci-build:X.Y.999 (as 
done for 10.2.x). Enable ONLY if that image tag has already been built and 
pushed; otherwise jobs on the new branch cannot start',
+            defaultValue: false
+        )
     }
 
     environment {
@@ -160,6 +170,51 @@ pipeline {
             }
         }
 
+        stage('Create stream branch') {
+            when {
+                expression { return params.CREATE_STREAM_BRANCH }
+            }
+            steps {
+                dir('kie-tools') {
+                    script {
+                        def m = (params.RELEASE_VERSION =~ 
/^(\d+)\.(\d+)\..+$/)
+                        if (!m.matches()) {
+                            error("Cannot derive stream branch from 
RELEASE_VERSION '${params.RELEASE_VERSION}' (expected e.g. 10.3.0)")
+                        }
+                        def streamBranch = "${m.group(1)}.${m.group(2)}.x"
+                        def devVersion = "${m.group(1)}.${m.group(2)}.999"
+                        def devMavenVersion = "${devVersion}-SNAPSHOT"
+                        m = null
+
+                        def exists = sh(
+                            returnStatus: true,
+                            script: "git ls-remote --exit-code --heads origin 
${streamBranch} > /dev/null"
+                        ) == 0
+                        if (exists) {
+                            error("Branch '${streamBranch}' already exists on 
origin. The branch cut is done once per minor; unset CREATE_STREAM_BRANCH for 
rc2 / patch releases.")
+                        }
+
+                        // Same set of changes as the 10.2.x branch cut 
(Jenkinsfile.setup-branch):
+                        // project version, kogito maven version, stream name 
(+ optional CI image tag).
+                        withEnv(["STREAM_BRANCH=${streamBranch}", 
"DEV_VERSION=${devVersion}", "DEV_MAVEN_VERSION=${devMavenVersion}", 
"UPDATE_CI_IMAGE_TAG=${params.UPDATE_CI_IMAGE_TAG}"]) {
+                            sh '''#!/bin/bash -el
+                            git checkout -b "$STREAM_BRANCH"
+                            pnpm update-version-to "$DEV_VERSION"
+                            pnpm update-kogito-version-to --maven 
"$DEV_MAVEN_VERSION"
+                            pnpm update-stream-name-to "$STREAM_BRANCH"
+                            if [ "$UPDATE_CI_IMAGE_TAG" = "true" ]; then
+                              find .ci/jenkins -type f -name 'Jenkinsfile.*' 
-exec sed -E -i 
"s%(incubator-kie-tools-ci-build:)(main|[$][{]env[.]BRANCH_NAME[}])%\\1${DEV_VERSION}%g"
 {} +
+                            fi
+                            git add .
+                            git commit --allow-empty -am "Update development 
version to $DEV_VERSION"
+                            '''
+                        }
+                        githubUtils.pushObject('origin', streamBranch, 
"${pipelineVars.asfGithubPushCredentialsId}")
+                    }
+                }
+            }
+        }
+
         stage('Update versions') {
             steps {
                 dir('kie-tools') {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to