This is an automated email from the ASF dual-hosted git repository.
Kusuma04-dev pushed a commit to branch test_103
in repository https://gitbox.apache.org/repos/asf/incubator-kie.git
The following commit(s) were added to refs/heads/test_103 by this push:
new 04b2f0f8714 tests
04b2f0f8714 is described below
commit 04b2f0f8714529b6a09ed34c52eae9d000d85ceb
Author: Kusuma <[email protected]>
AuthorDate: Sat Oct 17 19:23:46 2026 +0530
tests
---
.ci/jenkins/project/Jenkinsfile.103xplus.release | 94 +++++++++++++++++-------
1 file changed, 68 insertions(+), 26 deletions(-)
diff --git a/.ci/jenkins/project/Jenkinsfile.103xplus.release
b/.ci/jenkins/project/Jenkinsfile.103xplus.release
index 46887f161ef..dd33abf15f5 100644
--- a/.ci/jenkins/project/Jenkinsfile.103xplus.release
+++ b/.ci/jenkins/project/Jenkinsfile.103xplus.release
@@ -17,38 +17,64 @@
* under the License.
*/
+// 10.3.x+ release pipeline — fully independent, no kogito-pipelines /
jobs.groovy dependency.
+// - No @Library, no DSL-injected env vars, no drools-deploy /
drools-promote downstream jobs
+// - Create a plain "Pipeline script from SCM" job pointing at this file and
run it
+// with a few parameters. Everything it needs is a parameter (with a
default).
+// - Runs script/release/release-all.sh (R commit + RC tag -> build -> Nexus
staging)
+//
+// MANDATORY parameters : RELEASE_VERSION, TAG_NAME
+// Real RC run : DEPLOY=true, PUSH_TAG=true, DRY_RUN=false
+
pipeline {
agent {
label 'ubuntu'
}
+ tools {
+ maven 'maven_3.9.16'
+ jdk 'jdk_17_latest'
+ }
+
options {
timestamps()
timeout(time: 360, unit: 'MINUTES')
}
parameters {
- string(name: 'RELEASE_VERSION', defaultValue: '10.3.0', description:
'Exact release version, e.g. 10.3.0', trim: true)
- string(name: 'TAG_NAME', defaultValue: '10.3.0-rc1', description: 'RC
or Release tag name, e.g. 10.3.0-rc1', trim: true)
+ string(name: 'RELEASE_VERSION', defaultValue: '', description:
'MANDATORY. Exact release version, e.g. 10.3.0', trim: true)
+ string(name: 'TAG_NAME', defaultValue: '', description: 'MANDATORY. RC
tag name, e.g. 10.3.0-rc1 (must start with RELEASE_VERSION and be a new tag)',
trim: true)
booleanParam(name: 'SKIP_TESTS', defaultValue: true, description:
'Skip running tests during reactor build')
booleanParam(name: 'DEPLOY', defaultValue: true, description: 'Deploy
artifacts to Apache Nexus staging')
string(name: 'STAGING_URL', defaultValue: '', description: 'Custom
Nexus staging URL (optional)')
booleanParam(name: 'PUSH_TAG', defaultValue: true, description: 'Push
the git tag to origin')
string(name: 'EXTRA_MAVEN_OPTS', defaultValue: '', description: 'Extra
Maven CLI options to pass to build.sh')
booleanParam(name: 'DRY_RUN', defaultValue: false, description: 'Dry
run without making remote git or staging changes')
- booleanParam(name: 'SEND_NOTIFICATION', defaultValue: false,
description: 'Send a notification on CI channel when pipeline finishes')
- }
+ booleanParam(name: 'SEND_NOTIFICATION', defaultValue: false,
description: 'Send an e-mail when the pipeline finishes (requires
NOTIFICATION_EMAIL)')
+ string(name: 'NOTIFICATION_EMAIL', defaultValue: '', description:
'Optional. Recipient for SEND_NOTIFICATION', trim: true)
- environment {
- DROOLS_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
+ // Jenkins IDs — defaults match the existing KIE Jenkins; override
only if they differ.
+ string(name: 'MAVEN_SETTINGS_CONFIG_FILE_ID', defaultValue:
'kie-release-authn-settings', description: 'Config File Provider ID of the
Maven settings.xml (must define server "apache.releases.https")', trim: true)
+ string(name: 'GPG_KEY_CREDS_ID', defaultValue: 'GPG_KEY_FILE',
description: 'Secret FILE credential ID holding the armored GPG private key',
trim: true)
+ string(name: 'GPG_PASSPHRASE_CREDS_ID', defaultValue:
'GPG_KEY_PASSPHRASE', description: 'Secret TEXT credential ID holding the GPG
key passphrase', trim: true)
+ string(name: 'GIT_PUSH_CREDS_ID', defaultValue:
'84811880-2025-45b6-a44c-2f33bef30ad2', description: 'Username/password
credential ID used to push the RC tag to GitHub', trim: true)
+ string(name: 'GIT_AUTHOR_NAME', defaultValue: 'Apache KIE Release
Bot', description: 'git user.name for the R commit', trim: true)
+ string(name: 'GIT_AUTHOR_EMAIL', defaultValue: '[email protected]',
description: 'git user.email for the R commit', trim: true)
}
stages {
stage('Initialize & Validate') {
steps {
script {
- assert params.RELEASE_VERSION : 'RELEASE_VERSION parameter
is mandatory'
- assert params.TAG_NAME : 'TAG_NAME parameter is mandatory'
+ if (!params.RELEASE_VERSION?.trim()) {
+ error 'RELEASE_VERSION parameter is mandatory (e.g.
10.3.0)'
+ }
+ if (!params.TAG_NAME?.trim()) {
+ error 'TAG_NAME parameter is mandatory (e.g.
10.3.0-rc1)'
+ }
+ if (!params.TAG_NAME.startsWith(params.RELEASE_VERSION)) {
+ error "TAG_NAME '${params.TAG_NAME}' must start with
RELEASE_VERSION '${params.RELEASE_VERSION}'"
+ }
currentBuild.displayName = "Release
${params.RELEASE_VERSION} (${params.TAG_NAME})"
}
}
@@ -56,25 +82,30 @@ pipeline {
stage('Execute Release Scripts') {
steps {
- // MAVEN_SETTINGS_CONFIG_FILE_ID is a Jenkins Config File ID,
not a
- // secret credential — it must be injected via
configFileProvider,
- // which writes it to a temp path and exposes
MAVEN_SETTINGS_FILE.
- // GPG_PASSPHRASE_CREDS_ID and GIT_AUTHOR_PUSH_CREDS_ID are
real
- // credentials and use withCredentials.
- configFileProvider([configFile(fileId:
env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) {
+ // The Maven settings id is a Config File Provider id (not a
secret) and is
+ // exposed as MAVEN_SETTINGS_FILE. GPG key/passphrase and the
GitHub push
+ // credential are real credentials and use withCredentials.
+ configFileProvider([configFile(fileId:
params.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) {
withCredentials([
- string(credentialsId: env.GPG_PASSPHRASE_CREDS_ID,
variable: 'MAVEN_GPG_PASSPHRASE'),
- usernamePassword(credentialsId:
env.GIT_AUTHOR_PUSH_CREDS_ID, usernameVariable: 'GITHUB_USER',
passwordVariable: 'GITHUB_TOKEN')
+ file(credentialsId: params.GPG_KEY_CREDS_ID, variable:
'GPG_KEY_FILE_PATH'),
+ string(credentialsId: params.GPG_PASSPHRASE_CREDS_ID,
variable: 'MAVEN_GPG_PASSPHRASE'),
+ usernamePassword(credentialsId:
params.GIT_PUSH_CREDS_ID, usernameVariable: 'GITHUB_USER', passwordVariable:
'GITHUB_TOKEN')
]) {
script {
- // Configure Git identity for the R commit and
authenticate
- // the raw `git push` in 02-rc-commit.sh. Same
mechanism as
- // githubscm.pushObject: the helper reads the
token from the
- // environment at push time, so it is never
written to disk.
+ // Import the signing key so the apache-release
profile can sign
+ // artifacts. Passphrase is supplied later via
MAVEN_GPG_PASSPHRASE.
+ sh '''#!/usr/bin/env bash
+ set -euo pipefail
+ gpg --batch --pinentry-mode=loopback --import
"$GPG_KEY_FILE_PATH"
+ '''
+
+ // Configure Git identity for the R commit and
authenticate the
+ // raw `git push` in 02-rc-commit.sh. The
credential helper reads
+ // the token from the environment at push time,
never from disk.
sh """#!/usr/bin/env bash
set -euo pipefail
- git config user.email "${env.GIT_AUTHOR_EMAIL ?:
'[email protected]'}"
- git config user.name "${env.GIT_AUTHOR ?: 'Apache
KIE Release Bot'}"
+ git config user.email "${params.GIT_AUTHOR_EMAIL}"
+ git config user.name "${params.GIT_AUTHOR_NAME}"
git config --local credential.helper '!f() { echo
username=\$GITHUB_USER; echo password=\$GITHUB_TOKEN; }; f'
"""
@@ -125,14 +156,25 @@ pipeline {
}
void sendNotification() {
- if (params.SEND_NOTIFICATION) {
- mailer.sendMarkdownTestSummaryNotification('Release',
"[${params.TAG_NAME}] Drools", [env.DROOLS_CI_EMAIL_TO])
+ if (params.SEND_NOTIFICATION && params.NOTIFICATION_EMAIL) {
+ mail(
+ to: params.NOTIFICATION_EMAIL,
+ subject: "[SUCCESS] Release ${params.RELEASE_VERSION}
(${params.TAG_NAME}) Drools - Build ${BUILD_TAG}",
+ body: "Release pipeline succeeded.\n\nBuild URL: ${BUILD_URL}"
+ )
} else {
echo 'No notification sent per configuration'
}
}
void sendErrorNotification() {
- sendNotification()
- mailer.sendMarkdownErrorNotification('Release', "[${params.TAG_NAME}]
Drools", [env.DROOLS_CI_EMAIL_TO])
+ if (params.SEND_NOTIFICATION && params.NOTIFICATION_EMAIL) {
+ mail(
+ to: params.NOTIFICATION_EMAIL,
+ subject: "[FAILURE] Release ${params.RELEASE_VERSION}
(${params.TAG_NAME}) Drools - Build ${BUILD_TAG}",
+ body: "Release pipeline failed.\n\nBuild URL: ${BUILD_URL}"
+ )
+ } else {
+ echo 'No notification sent per configuration'
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]