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.git
The following commit(s) were added to refs/heads/test_10.3.x by this push:
new 8c535a447d1 test
8c535a447d1 is described below
commit 8c535a447d188045595c70fad1b46fd0a8260a74
Author: Kusuma <[email protected]>
AuthorDate: Tue Oct 13 11:57:30 2026 +0530
test
---
.ci/jenkins/Jenkinsfile.103xplus.deploy | 45 ++++++++++++++++++++++++++++++++
.ci/jenkins/Jenkinsfile.103xplus.promote | 38 +++++++++++++++++++++++++++
2 files changed, 83 insertions(+)
diff --git a/.ci/jenkins/Jenkinsfile.103xplus.deploy
b/.ci/jenkins/Jenkinsfile.103xplus.deploy
index 8a4e7f2d090..42323d18bb1 100644
--- a/.ci/jenkins/Jenkinsfile.103xplus.deploy
+++ b/.ci/jenkins/Jenkinsfile.103xplus.deploy
@@ -80,6 +80,16 @@ pipeline {
}
}
+ stage('Setup Maven') {
+ // The CI agent image may ship an older Maven than the one
kie-parent's enforcer
+ // requires (version.org.apache.maven). Install the required
version into the workspace.
+ steps {
+ script {
+ installMaven()
+ }
+ }
+ }
+
stage('Prepare for PR') {
when {
expression { return isCreatePr() }
@@ -281,6 +291,41 @@ void setDeployPropertyIfNeeded(String key, def value) {
}
}
+void installMaven() {
+ // Fallback only used if the version can't be read from kie-parent
+ def mavenVersion = '3.9.16'
+ def pomFile = "${getRepoName()}/kie-parent/pom.xml"
+ if (fileExists(pomFile)) {
+ def pomVersion = sh(returnStdout: true, script: "grep -o
'<version.org.apache.maven>[^<]*' ${pomFile} | head -1 | cut -d'>' -f2").trim()
+ if (pomVersion) {
+ mavenVersion = pomVersion
+ }
+ }
+ echo "Installing Maven ${mavenVersion}"
+
+ withEnv(["MAVEN_VERSION=${mavenVersion}"]) {
+ sh '''#!/usr/bin/env bash
+ set -euo pipefail
+ INSTALL_DIR="${WORKSPACE}/.tools"
+ MAVEN_DIR="${INSTALL_DIR}/apache-maven-${MAVEN_VERSION}"
+ if [ ! -x "${MAVEN_DIR}/bin/mvn" ]; then
+ ARCHIVE="apache-maven-${MAVEN_VERSION}-bin.tar.gz"
+
BASE_URL="https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/${MAVEN_VERSION}"
+ mkdir -p "${INSTALL_DIR}"
+ curl -fsSL --retry 5 -o "${INSTALL_DIR}/${ARCHIVE}"
"${BASE_URL}/${ARCHIVE}"
+ curl -fsSL --retry 5 -o "${INSTALL_DIR}/${ARCHIVE}.sha512"
"${BASE_URL}/${ARCHIVE}.sha512"
+ echo "$(cut -d' ' -f1 "${INSTALL_DIR}/${ARCHIVE}.sha512")
${INSTALL_DIR}/${ARCHIVE}" | sha512sum -c -
+ tar -xzf "${INSTALL_DIR}/${ARCHIVE}" -C "${INSTALL_DIR}"
+ rm -f "${INSTALL_DIR}/${ARCHIVE}"
"${INSTALL_DIR}/${ARCHIVE}.sha512"
+ fi
+ '''
+ }
+
+ env.MAVEN_HOME = "${env.WORKSPACE}/.tools/apache-maven-${mavenVersion}"
+ env.PATH = "${env.MAVEN_HOME}/bin:${env.PATH}"
+ sh 'mvn -version'
+}
+
MavenCommand getMavenCommand() {
def mvnCmd = new MavenCommand(this, ['-fae', '-ntp'])
.withOptions(env.BUILD_MVN_OPTS ? [ env.BUILD_MVN_OPTS ] : [])
diff --git a/.ci/jenkins/Jenkinsfile.103xplus.promote
b/.ci/jenkins/Jenkinsfile.103xplus.promote
index 5dfb4e1d2c3..7f2cecb28f5 100644
--- a/.ci/jenkins/Jenkinsfile.103xplus.promote
+++ b/.ci/jenkins/Jenkinsfile.103xplus.promote
@@ -136,6 +136,7 @@ pipeline {
}
steps {
script {
+ installMaven()
configFileProvider([configFile(fileId:
env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) {
getMavenCommand()
.withOptions(env.DROOLS_BUILD_MVN_OPTS ? [
env.DROOLS_BUILD_MVN_OPTS ] : [])
@@ -272,6 +273,43 @@ void tagLatest() {
}
}
+void installMaven() {
+ // The CI agent image may ship an older Maven than the one kie-parent's
enforcer
+ // requires (version.org.apache.maven). Install the required version into
the workspace.
+ // Fallback only used if the version can't be read from kie-parent
+ def mavenVersion = '3.9.16'
+ def pomFile = "${getRepoName()}/kie-parent/pom.xml"
+ if (fileExists(pomFile)) {
+ def pomVersion = sh(returnStdout: true, script: "grep -o
'<version.org.apache.maven>[^<]*' ${pomFile} | head -1 | cut -d'>' -f2").trim()
+ if (pomVersion) {
+ mavenVersion = pomVersion
+ }
+ }
+ echo "Installing Maven ${mavenVersion}"
+
+ withEnv(["MAVEN_VERSION=${mavenVersion}"]) {
+ sh '''#!/usr/bin/env bash
+ set -euo pipefail
+ INSTALL_DIR="${WORKSPACE}/.tools"
+ MAVEN_DIR="${INSTALL_DIR}/apache-maven-${MAVEN_VERSION}"
+ if [ ! -x "${MAVEN_DIR}/bin/mvn" ]; then
+ ARCHIVE="apache-maven-${MAVEN_VERSION}-bin.tar.gz"
+
BASE_URL="https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/${MAVEN_VERSION}"
+ mkdir -p "${INSTALL_DIR}"
+ curl -fsSL --retry 5 -o "${INSTALL_DIR}/${ARCHIVE}"
"${BASE_URL}/${ARCHIVE}"
+ curl -fsSL --retry 5 -o "${INSTALL_DIR}/${ARCHIVE}.sha512"
"${BASE_URL}/${ARCHIVE}.sha512"
+ echo "$(cut -d' ' -f1 "${INSTALL_DIR}/${ARCHIVE}.sha512")
${INSTALL_DIR}/${ARCHIVE}" | sha512sum -c -
+ tar -xzf "${INSTALL_DIR}/${ARCHIVE}" -C "${INSTALL_DIR}"
+ rm -f "${INSTALL_DIR}/${ARCHIVE}"
"${INSTALL_DIR}/${ARCHIVE}.sha512"
+ fi
+ '''
+ }
+
+ env.MAVEN_HOME = "${env.WORKSPACE}/.tools/apache-maven-${mavenVersion}"
+ env.PATH = "${env.MAVEN_HOME}/bin:${env.PATH}"
+ sh 'mvn -version'
+}
+
MavenCommand getMavenCommand() {
mvnCmd = new MavenCommand(this, ['-fae', '-ntp'])
.withOptions(env.BUILD_MVN_OPTS ? [ env.BUILD_MVN_OPTS ] :
[])
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]