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 29bc7d25a98 updated
29bc7d25a98 is described below
commit 29bc7d25a987412c976216a5eb3c87e114f4b0a0
Author: Kusuma <[email protected]>
AuthorDate: Wed Oct 28 12:57:16 2026 +0530
updated
---
.ci/jenkins/Jenkinsfile.103xplus.deploy | 315 ---------------------
.ci/jenkins/Jenkinsfile.103xplus.promote | 308 --------------------
...ease => Jenkinsfile.103xplus.release-candidate} | 53 +---
.ci/jenkins/Jenkinsfile.103xplus.release-promote | 139 +++++++++
.ci/jenkins/config/branch.yaml | 4 +-
script/release/README.md | 105 ++++---
script/release/upload_filemgmt.sh | 127 ---------
7 files changed, 220 insertions(+), 831 deletions(-)
diff --git a/.ci/jenkins/Jenkinsfile.103xplus.deploy
b/.ci/jenkins/Jenkinsfile.103xplus.deploy
deleted file mode 100644
index a6f0bca54fc..00000000000
--- a/.ci/jenkins/Jenkinsfile.103xplus.deploy
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-// 10.3.x+ deploy pipeline — no kogito-pipelines dependency.
-// - agent { label 'ubuntu' } + tools block instead of docker { image
AGENT_DOCKER_BUILDER_IMAGE }
-// - Version update via script/release/01-update-version.sh (no MavenCommand
shared library)
-// - Build via direct mvn invocation (no MavenCommand shared library)
-// - PR creation via 'gh' CLI instead of githubscm shared-library helpers
-// - @Library removed entirely
-
-deployProperties = [:]
-prBranchHash = ''
-
-pipeline {
- agent {
- label 'ubuntu'
- }
-
- tools {
- maven 'maven_3.9.16'
- jdk 'jdk_17_latest'
- }
-
- options {
- timestamps()
- timeout(time: 300, unit: 'MINUTES')
- }
-
- environment {
- DROOLS_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
- }
-
- stages {
- stage('Initialize') {
- steps {
- script {
- cleanWs(disableDeferredWipeout: true)
-
- prBranchHash = sh(script: 'openssl rand -hex 5',
returnStdout: true).trim()
-
- if (params.DISPLAY_NAME) {
- currentBuild.displayName = params.DISPLAY_NAME
- }
-
- if (isCreatePr()) {
- assert getProjectVersion() : 'PROJECT_VERSION is
required when CREATE_PR is true'
- }
-
- dir(getRepoName()) {
- checkoutRepo()
- }
- }
- }
- post {
- success {
- script {
- setDeployPropertyIfNeeded('git.branch',
getBuildBranch())
- setDeployPropertyIfNeeded('git.author', getGitAuthor())
- setDeployPropertyIfNeeded('project.version',
getProjectVersion())
- }
- }
- }
- }
-
- stage('Prepare for PR') {
- when {
- expression { return isCreatePr() }
- }
- steps {
- script {
- dir(getRepoName()) {
- withCredentials([usernamePassword(credentialsId:
getGitAuthorPushCredsId(), usernameVariable: 'GITHUB_USER', passwordVariable:
'GITHUB_TOKEN')]) {
- 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 --local credential.helper '!f() { echo
username=\$GITHUB_USER; echo password=\$GITHUB_TOKEN; }; f'
- if git ls-remote --exit-code origin
'${getPRBranch()}'; then
- git push origin --delete '${getPRBranch()}' ||
true
- fi
- git checkout -b '${getPRBranch()}'
- """
- }
- }
- }
- }
- }
-
- stage('Update project version') {
- when {
- expression { return getProjectVersion() }
- }
- steps {
- script {
- dir(getRepoName()) {
- configFileProvider([configFile(fileId:
env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) {
- sh """#!/usr/bin/env bash
- set -euo pipefail
- chmod +x script/release/01-update-version.sh
- MAVEN_SETTINGS="\${MAVEN_SETTINGS_FILE}" \
- ./script/release/01-update-version.sh
'${getProjectVersion()}'
- """
- }
- }
- }
- }
- }
-
- stage('Build & Deploy repo') {
- steps {
- script {
- dir(getRepoName()) {
- configFileProvider([configFile(fileId:
env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) {
- withCredentials([usernamePassword(credentialsId:
env.MAVEN_REPO_CREDS_ID, usernameVariable: 'REPOSITORY_USER', passwordVariable:
'REPOSITORY_TOKEN')]) {
- def goal
- if (shouldDeployToRepository()) {
- goal = "deploy -DdeployAtEnd
-Dapache.repository.username=\${REPOSITORY_USER}
-Dapache.repository.password=\${REPOSITORY_TOKEN}
-DretryFailedDeploymentCount=5"
- } else {
- goal = 'install'
- }
-
- def extraOpts = [
- env.BUILD_MVN_OPTS,
- env.DROOLS_BUILD_MVN_OPTS,
- env.BUILD_MVN_OPTS_CURRENT
- ].findAll { it }.join(' ')
-
- def skipTestsFlag = params.SKIP_TESTS ?
'-DskipTests=true' : '-DskipTests=false'
-
- sh """#!/usr/bin/env bash
- set -euo pipefail
- mvn -s "\${MAVEN_SETTINGS_FILE}" -B -ntp -fae \
- -Dfull \
- ${skipTestsFlag} \
- -Dmaven.test.failure.ignore=true \
- ${extraOpts} \
- clean ${goal}
- """
- }
- }
- }
- }
- }
- post {
- always {
- script {
- dir(getRepoName()) {
- saveReports()
- archiveArtifacts(artifacts: 'build_logs/**',
allowEmptyArchive: true)
- }
- }
- }
- }
- }
-
- stage('Create PR') {
- when {
- expression { return isCreatePr() }
- }
- steps {
- script {
- dir(getRepoName()) {
- withCredentials([usernamePassword(credentialsId:
getGitAuthorPushCredsId(), usernameVariable: 'GITHUB_USER', passwordVariable:
'GITHUB_TOKEN')]) {
- def prLink = sh(script: """#!/usr/bin/env bash
- set -euo pipefail
- git config --local credential.helper '!f() { echo
username=\$GITHUB_USER; echo password=\$GITHUB_TOKEN; }; f'
-
- # Stage only pom.xml and antora.yml changes
(version bump files)
- git add -A -- '*.xml' '*/antora.yml' 2>/dev/null
|| true
- if git diff --cached --quiet; then
- echo '[WARN] no changes to commit' >&2
- echo ''
- exit 0
- fi
-
- COMMIT_MSG="[${getBuildBranch()}] Update version
to ${getProjectVersion()}"
- git commit -m "\${COMMIT_MSG}"
- git push origin '${getPRBranch()}'
-
- PR_BODY="Generated by build ${BUILD_TAG}:
${BUILD_URL}.\\nPlease do not merge, it should be merged automatically."
- gh pr create \
- --repo '${getGitAuthor()}/${getRepoName()}' \
- --head '${getPRBranch()}' \
- --base '${getBuildBranch()}' \
- --title "\${COMMIT_MSG}" \
- --body "\${PR_BODY}" \
- --label 'skip-ci'
- """, returnStdout: true).trim()
-
- if (prLink) {
- deployProperties["${getRepoName()}.pr.link"] =
prLink
- }
- }
- }
- }
- }
- post {
- success {
- script {
-
setDeployPropertyIfNeeded("${getRepoName()}.pr.source.uri",
"https://github.com/${getGitAuthor()}/${getRepoName()}")
-
setDeployPropertyIfNeeded("${getRepoName()}.pr.source.ref", getPRBranch())
-
setDeployPropertyIfNeeded("${getRepoName()}.pr.target.uri",
"https://github.com/${getGitAuthor()}/${getRepoName()}")
-
setDeployPropertyIfNeeded("${getRepoName()}.pr.target.ref", getBuildBranch())
- }
- }
- }
- }
- }
- post {
- always {
- script {
- setDeployPropertyIfNeeded("${getRepoName()}.deploy.build.run",
true)
- def propertiesStr = deployProperties.collect { entry ->
"${entry.key}=${entry.value}" }.join('\n')
- writeFile(text: propertiesStr, file: PROPERTIES_FILE_NAME)
- archiveArtifacts(artifacts: PROPERTIES_FILE_NAME)
- }
- }
- unsuccessful {
- sendNotification()
- }
- cleanup {
- cleanWs()
- }
- }
-}
-
-void saveReports() {
- junit testResults: '**/target/surefire-reports/**/*.xml,
**/target/failsafe-reports/**/*.xml, **/target/invoker-reports/**/TEST-*.xml',
allowEmptyResults: true
-}
-
-void checkoutRepo() {
- deleteDir()
- checkout([$class: 'GitSCM',
- branches: [[name: "*/${getBuildBranch()}"]],
- userRemoteConfigs: [[
- url: "https://github.com/${getGitAuthor()}/${getRepoName()}.git",
- credentialsId: getGitAuthorCredsId()
- ]]
- ])
- sh "git checkout ${getBuildBranch()}"
-}
-
-void sendNotification() {
- if (params.SEND_NOTIFICATION) {
- mail(
- to: env.DROOLS_CI_EMAIL_TO,
- subject: "[FAILURE] Deploy [${getBuildBranch()}] Drools - Build
${BUILD_TAG}",
- body: "Deploy pipeline failed.\n\nBuild URL: ${BUILD_URL}"
- )
- } else {
- echo 'No notification sent per configuration'
- }
-}
-
-boolean shouldDeployToRepository() {
- return env.MAVEN_DEPLOY_REPOSITORY || getGitAuthor() == 'apache'
-}
-
-boolean isCreatePr() {
- return params.CREATE_PR
-}
-
-boolean isStreamDevVersion() {
- return getProjectVersion()?.contains('-SNAPSHOT') ?: false
-}
-
-String getRepoName() {
- return env.REPO_NAME
-}
-
-String getGitAuthor() {
- return "${GIT_AUTHOR}"
-}
-
-String getBuildBranch() {
- return params.BUILD_BRANCH_NAME
-}
-
-String getProjectVersion() {
- return params.PROJECT_VERSION
-}
-
-String getPRBranch() {
- return params.DROOLS_PR_BRANCH ?:
"drools-${getProjectVersion()}_${prBranchHash}"
-}
-
-String getGitAuthorCredsId() {
- return env.GIT_AUTHOR_CREDS_ID
-}
-
-String getGitAuthorPushCredsId() {
- return env.GIT_AUTHOR_PUSH_CREDS_ID ?: env.GIT_AUTHOR_CREDS_ID
-}
-
-void setDeployPropertyIfNeeded(String key, def value) {
- if (value) {
- deployProperties[key] = value
- }
-}
diff --git a/.ci/jenkins/Jenkinsfile.103xplus.promote
b/.ci/jenkins/Jenkinsfile.103xplus.promote
deleted file mode 100644
index 33cdfc578bf..00000000000
--- a/.ci/jenkins/Jenkinsfile.103xplus.promote
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-// 10.3.x+ promote pipeline — no kogito-pipelines dependency.
-// - agent { label 'ubuntu' } + tools block instead of docker { image
AGENT_DOCKER_BUILDER_IMAGE }
-// - 'Tag final release' stage delegates to 05-tag-release.sh (no shared
library)
-// - 'Create release' stage uses 'gh' CLI instead of githubscm
shared-library helpers
-// - 'Upload drools binaries and documentation' stage uses 03-build.sh
directly
-// - @Library removed entirely
-
-deployProperties = [:]
-
-pipeline {
- agent {
- label 'ubuntu'
- }
-
- tools {
- maven 'maven_3.9.16'
- jdk 'jdk_17_latest'
- }
-
- options {
- timestamps()
- timeout(time: 180, unit: 'MINUTES')
- }
-
- environment {
- DROOLS_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
- }
-
- stages {
- stage('Initialization') {
- steps {
- script {
- cleanWs()
-
- if (params.DISPLAY_NAME != '') {
- currentBuild.displayName = params.DISPLAY_NAME
- }
-
- readDeployProperties()
-
- assert getProjectVersion() : 'PROJECT_VERSION is required'
- // Build branch must match the release version stream
(e.g. 10.3.0 -> 10.3.x)
- def expectedBranch =
getProjectVersion().replaceFirst(/(\d+\.\d+)\.\d+.*/, '$1.x')
- assert getBuildBranch() == expectedBranch : \
- "BUILD_BRANCH_NAME '${getBuildBranch()}' does not
match version '${getProjectVersion()}' (expected '${expectedBranch}')"
- // GIT_TAG must be the approved RC tag; the final tag is
derived from it.
- assert getRcTag() ==~ /.+-rc[0-9]+/ : \
- "GIT_TAG must be the approved RC tag (e.g.
10.3.0-rc2), got '${getRcTag()}'"
- }
- }
- }
-
- stage('Merge deploy PR') {
- // NOTE: tagLatest() removed here intentionally.
- // In the 103xplus flow the final release tag is created by the
- // separate "Tag final release" stage below, which delegates to
- // 05-tag-release.sh so the tag always points to the approved
- // RC commit — NOT the current branch tip. Calling tagLatest()
- // here would create a duplicate tag at the wrong commit.
- steps {
- script {
- withCredentials([usernamePassword(credentialsId:
getGitAuthorPushCredsId(), usernameVariable: 'GITHUB_USER', passwordVariable:
'GITHUB_TOKEN')]) {
- def prLink = getDeployPrLink()
- if (prLink?.trim()) {
- sh """#!/usr/bin/env bash
- set -euo pipefail
- git config --local credential.helper '!f() { echo
username=\$GITHUB_USER; echo password=\$GITHUB_TOKEN; }; f'
- gh pr review '${prLink}' --approve
- gh pr merge '${prLink}' --merge --auto
- """
- }
- dir(getRepoName()) {
- checkoutRepo()
- }
- }
- }
- }
- }
-
- stage('Tag final release') {
- // Delegate final-tag creation to 05-tag-release.sh so the release
tag
- // always points to the approved RC commit — NOT the current
branch tip.
- // This matches the documented strategy: the R commit lives under
the RC
- // tag only; the development branch is never disturbed.
- // Runs before 'Create release' so the GitHub release attaches to
this
- // tag instead of creating one at the branch tip.
- steps {
- withCredentials([
- usernamePassword(credentialsId:
env.GIT_AUTHOR_PUSH_CREDS_ID, usernameVariable: 'GITHUB_USER',
passwordVariable: 'GITHUB_TOKEN')
- ]) {
- script {
- dir(getRepoName()) {
- 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 --local credential.helper '!f() { echo
username=\$GITHUB_USER; echo password=\$GITHUB_TOKEN; }; f'
- # Fetch the RC tag so the script can resolve it.
- git fetch origin
"refs/tags/${getRcTag()}:refs/tags/${getRcTag()}"
- chmod +x script/release/05-tag-release.sh
- ./script/release/05-tag-release.sh --rc-tag
"${getRcTag()}" --push
- """
- }
- }
- }
- }
- }
-
- stage('Create release') {
- steps {
- script {
- withCredentials([usernamePassword(credentialsId:
getGitAuthorPushCredsId(), usernameVariable: 'GITHUB_USER', passwordVariable:
'GITHUB_TOKEN')]) {
- sh """#!/usr/bin/env bash
- set -euo pipefail
- git config --local credential.helper '!f() { echo
username=\$GITHUB_USER; echo password=\$GITHUB_TOKEN; }; f'
-
- # Delete any pre-existing release so we can re-create
it cleanly.
- if gh release view '${getGitTag()}' --repo
'${getGitAuthor()}/${getRepoName()}' &>/dev/null; then
- gh release delete '${getGitTag()}' \
- --repo '${getGitAuthor()}/${getRepoName()}' \
- --yes
- fi
-
- # Derive the previous tag for release-note generation.
- PREV_TAG="\$(git tag --sort=-version:refname | grep -v
'^${getGitTag()}\$' | head -1 || true)"
-
- gh release create '${getGitTag()}' \
- --repo '${getGitAuthor()}/${getRepoName()}' \
- --target '${getBuildBranch()}' \
- --title '${getGitTag()}' \
- --generate-notes \
- \${PREV_TAG:+--notes-start-tag "\${PREV_TAG}"}
- """
- }
- }
- }
- }
-
- stage('Upload drools binaries and documentation') {
- when {
- expression { return isMainStream() }
- }
- steps {
- script {
- dir(getRepoName()) {
- sh """#!/usr/bin/env bash
- set -euo pipefail
- chmod +x script/release/03-build.sh
- ./script/release/03-build.sh --skip-tests
- """
-
- if (isNotTestingBuild()) {
- sshagent(['drools-filemgmt']) {
- sh """#!/usr/bin/env bash
- set -euo pipefail
- chmod +x script/release/upload_filemgmt.sh
- ./script/release/upload_filemgmt.sh
'${getProjectVersion()}'
- """
- }
- } else {
- echo 'No uploadFileMgmt due to testing build'
- }
- }
- }
- }
- }
- }
- post {
- unsuccessful {
- sendNotification()
- }
- cleanup {
- cleanWs()
- }
- }
-}
-
-void sendNotification() {
- if (params.SEND_NOTIFICATION) {
- mail(
- to: env.DROOLS_CI_EMAIL_TO,
- subject: "[FAILURE] Promote [${getBuildBranch()}] Drools - Build
${BUILD_TAG}",
- body: "Promote pipeline failed.\n\nBuild URL: ${BUILD_URL}"
- )
- } else {
- echo 'No notification sent per configuration'
- }
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// Deployment properties
-//////////////////////////////////////////////////////////////////////////////
-
-void readDeployProperties() {
- String deployUrl = params.DEPLOY_BUILD_URL
- if (deployUrl != '') {
- if (!deployUrl.endsWith('/')) {
- deployUrl += '/'
- }
- sh "wget ${deployUrl}artifact/${PROPERTIES_FILE_NAME} -O
${PROPERTIES_FILE_NAME}"
- deployProperties = readProperties file: PROPERTIES_FILE_NAME
- // echo all properties
- echo deployProperties.collect { entry -> "${entry.key}=${entry.value}"
}.join('\n')
- }
-}
-
-boolean hasDeployProperty(String key) {
- return deployProperties[key] != null
-}
-
-String getDeployProperty(String key) {
- if (hasDeployProperty(key)) {
- return deployProperties[key]
- }
- return ''
-}
-
-String getParamOrDeployProperty(String paramKey, String deployPropertyKey) {
- if (params[paramKey] != '') {
- return params[paramKey]
- }
- return getDeployProperty(deployPropertyKey)
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// Getter / Setter
-//////////////////////////////////////////////////////////////////////////////
-
-String getRepoName() {
- return env.REPO_NAME
-}
-
-String getProjectVersion() {
- return getParamOrDeployProperty('PROJECT_VERSION', 'project.version')
-}
-
-// Approved RC tag to promote (e.g. 10.3.0-rc2). Mandatory, validated in
Initialization.
-String getRcTag() {
- return params.GIT_TAG ?: ''
-}
-
-// Final release tag, derived from the RC tag (e.g. 10.3.0-rc2 -> 10.3.0).
-String getGitTag() {
- return getRcTag().replaceFirst(/-rc[0-9]+$/, '')
-}
-
-String getBuildBranch() {
- return params.BUILD_BRANCH_NAME
-}
-
-String getGitAuthor() {
- return env.GIT_AUTHOR
-}
-
-String getGitAuthorCredsId() {
- return env.GIT_AUTHOR_CREDS_ID
-}
-
-String getGitAuthorPushCredsId() {
- return env.GIT_AUTHOR_PUSH_CREDS_ID
-}
-
-String getDeployPrLink() {
- return getDeployProperty("${getRepoName()}.pr.link")
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// Git
-//////////////////////////////////////////////////////////////////////////////
-
-void checkoutRepo() {
- deleteDir()
- checkout([$class: 'GitSCM',
- branches: [[name: "*/${getBuildBranch()}"]],
- userRemoteConfigs: [[
- url: "https://github.com/${getGitAuthor()}/${getRepoName()}.git",
- credentialsId: getGitAuthorCredsId()
- ]]
- ])
- sh "git checkout ${getBuildBranch()}"
-}
-
-boolean isNotTestingBuild() {
- return getGitAuthor() == 'apache'
-}
-
-boolean isMainStream() {
- return env.DROOLS_STREAM == 'main'
-}
\ No newline at end of file
diff --git a/.ci/jenkins/project/Jenkinsfile.103xplus.release
b/.ci/jenkins/Jenkinsfile.103xplus.release-candidate
similarity index 80%
rename from .ci/jenkins/project/Jenkinsfile.103xplus.release
rename to .ci/jenkins/Jenkinsfile.103xplus.release-candidate
index aed2930e984..21806e2c0c9 100644
--- a/.ci/jenkins/project/Jenkinsfile.103xplus.release
+++ b/.ci/jenkins/Jenkinsfile.103xplus.release-candidate
@@ -24,9 +24,9 @@
// - 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
+// Real RC run : DEPLOY=true, PUSH_TAG=true, DRY_RUN=false (the
defaults)
// Branch cut (once per minor, before rc1 only):
-// CREATE_STREAM_BRANCH=true -> creates X.Y.x from
STREAM_BASE_BRANCH,
+// CREATE_STREAM_BRANCH=true -> creates X.Y.x from main,
// sets X.Y.999-SNAPSHOT, pushes it, then continues the
RC on X.Y.x.
// Leave it false for rc2, final and patch releases
(branch already exists).
@@ -48,24 +48,19 @@ pipeline {
parameters {
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: 'CREATE_STREAM_BRANCH', defaultValue: false,
description: 'Branch cut: create X.Y.x (derived from RELEASE_VERSION) from
STREAM_BASE_BRANCH, set X.Y.999-SNAPSHOT and push it BEFORE building the RC.
Only for the first RC of a new minor (e.g. 10.3.0-rc1). Fails if X.Y.x already
exists')
- string(name: 'STREAM_BASE_BRANCH', defaultValue: 'main', description:
'Used only when CREATE_STREAM_BRANCH=true. Branch the stream branch is cut
from', trim: true)
+ booleanParam(name: 'CREATE_STREAM_BRANCH', defaultValue: false,
description: 'Branch cut: create X.Y.x (derived from RELEASE_VERSION) from
main, set X.Y.999-SNAPSHOT and push it BEFORE building the RC. Only for the
first RC of a new minor (e.g. 10.3.0-rc1). Fails if X.Y.x already exists')
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 an e-mail when the pipeline finishes (requires
NOTIFICATION_EMAIL)')
- string(name: 'NOTIFICATION_EMAIL', defaultValue: '', description:
'Optional. Recipient for SEND_NOTIFICATION', trim: true)
// 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: '', description:
'Optional. Secret TEXT credential ID holding the GPG key passphrase. Leave
empty if the key has no passphrase (KIE release key has none)', 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 {
@@ -96,15 +91,15 @@ pipeline {
def branchArgs = [
'./script/release/00-create-stream-branch.sh',
'--version', params.RELEASE_VERSION,
- '--base', params.STREAM_BASE_BRANCH,
+ '--base', 'main',
'--push'
]
if (params.DRY_RUN) branchArgs << '--dry-run'
sh """#!/usr/bin/env bash
set -euo pipefail
- git config user.email "${params.GIT_AUTHOR_EMAIL}"
- git config user.name "${params.GIT_AUTHOR_NAME}"
+ git config user.email "[email protected]"
+ git config user.name "Apache KIE Release Bot"
git config --local credential.helper '!f() { echo
username=\$GITHUB_USER; echo password=\$GITHUB_TOKEN; }; f'
chmod +x script/release/*.sh
${branchArgs.collect { "'${it.replace("'", "'\\''")}'"
}.join(' ')}
@@ -142,8 +137,8 @@ pipeline {
// the token from the environment at push time,
never from disk.
sh """#!/usr/bin/env bash
set -euo pipefail
- git config user.email "${params.GIT_AUTHOR_EMAIL}"
- git config user.name "${params.GIT_AUTHOR_NAME}"
+ git config user.email "[email protected]"
+ git config user.name "Apache KIE Release Bot"
git config --local credential.helper '!f() { echo
username=\$GITHUB_USER; echo password=\$GITHUB_TOKEN; }; f'
"""
@@ -182,37 +177,5 @@ pipeline {
always {
cleanWs()
}
- success {
- script {
- sendNotification()
- }
- }
- unsuccessful {
- sendErrorNotification()
- }
- }
-}
-
-void sendNotification() {
- 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() {
- 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'
}
}
diff --git a/.ci/jenkins/Jenkinsfile.103xplus.release-promote
b/.ci/jenkins/Jenkinsfile.103xplus.release-promote
new file mode 100644
index 00000000000..7df581716b0
--- /dev/null
+++ b/.ci/jenkins/Jenkinsfile.103xplus.release-promote
@@ -0,0 +1,139 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// 10.3.x+ promote / tag-release pipeline for incubator-kie.
+// Run after the IPMC vote passes to:
+// 1. Create and push the official release Git tag (e.g. 10.3.0) pointing to
the approved RC commit.
+// 2. Create the GitHub Release for incubator-kie.
+
+pipeline {
+ agent {
+ label 'ubuntu'
+ }
+
+ tools {
+ maven 'maven_3.9.16'
+ jdk 'jdk_17_latest'
+ }
+
+ options {
+ timestamps()
+ timeout(time: 60, unit: 'MINUTES')
+ }
+
+ parameters {
+ string(name: 'PROJECT_VERSION', defaultValue: '', description:
'Release version (e.g. 10.3.0)', trim: true)
+ string(name: 'GIT_TAG', defaultValue: '', description: 'Approved RC
tag (e.g. 10.3.0-rc1)', trim: true)
+ string(name: 'BUILD_BRANCH_NAME', defaultValue: '', description:
'Stream branch name (e.g. 10.3.x)', trim: true)
+ string(name: 'GIT_AUTHOR_PUSH_CREDS_ID', defaultValue:
'84811880-2025-45b6-a44c-2f33bef30ad2', description: 'GitHub push credentials
ID', trim: true)
+ }
+
+ stages {
+ stage('Initialization') {
+ steps {
+ script {
+ cleanWs()
+
+ assert params.PROJECT_VERSION : 'PROJECT_VERSION is
required (e.g. 10.3.0)'
+ assert params.GIT_TAG : 'GIT_TAG (approved RC tag, e.g.
10.3.0-rc1) is required'
+ assert params.BUILD_BRANCH_NAME : 'BUILD_BRANCH_NAME (e.g.
10.3.x) is required'
+
+ currentBuild.displayName = "${params.PROJECT_VERSION}
(${params.GIT_TAG})"
+ }
+ }
+ }
+
+ stage('Checkout repository') {
+ steps {
+ script {
+ dir('incubator-kie') {
+ checkout([$class: 'GitSCM',
+ branches: [[name:
"*/${params.BUILD_BRANCH_NAME}"]],
+ userRemoteConfigs: [[
+ url:
'https://github.com/apache/incubator-kie.git',
+ credentialsId: params.GIT_AUTHOR_PUSH_CREDS_ID
+ ]]
+ ])
+ }
+ }
+ }
+ }
+
+ stage('Tag final release') {
+ steps {
+ dir('incubator-kie') {
+ withCredentials([
+ usernamePassword(credentialsId:
params.GIT_AUTHOR_PUSH_CREDS_ID, usernameVariable: 'GITHUB_USER',
passwordVariable: 'GITHUB_TOKEN')
+ ]) {
+ sh """#!/usr/bin/env bash
+ set -euo pipefail
+ git config user.email "[email protected]"
+ git config user.name "Apache KIE Release Bot"
+ git config --local credential.helper '!f() { echo
username=\$GITHUB_USER; echo password=\$GITHUB_TOKEN; }; f'
+
+ # Fetch the approved RC tag
+ git fetch origin
"refs/tags/${params.GIT_TAG}:refs/tags/${params.GIT_TAG}"
+
+ # Create and push the final release tag
+ chmod +x script/release/05-tag-release.sh
+ ./script/release/05-tag-release.sh --rc-tag
"${params.GIT_TAG}" --push
+ """
+ }
+ }
+ }
+ }
+
+ stage('Create GitHub Release') {
+ steps {
+ dir('incubator-kie') {
+ withCredentials([
+ usernamePassword(credentialsId:
params.GIT_AUTHOR_PUSH_CREDS_ID, usernameVariable: 'GITHUB_USER',
passwordVariable: 'GITHUB_TOKEN')
+ ]) {
+ sh """#!/usr/bin/env bash
+ set -euo pipefail
+ git config --local credential.helper '!f() { echo
username=\$GITHUB_USER; echo password=\$GITHUB_TOKEN; }; f'
+
+ FINAL_TAG="${params.PROJECT_VERSION}"
+
+ # Delete any pre-existing release for this tag if
needed
+ if gh release view "\${FINAL_TAG}" --repo
"apache/incubator-kie" &>/dev/null; then
+ gh release delete "\${FINAL_TAG}" --repo
"apache/incubator-kie" --yes
+ fi
+
+ PREV_TAG="\$(git tag --sort=-version:refname | grep -v
"^\${FINAL_TAG}\$" | head -1 || true)"
+
+ gh release create "\${FINAL_TAG}" \
+ --repo "apache/incubator-kie" \
+ --target "${params.BUILD_BRANCH_NAME}" \
+ --title "\${FINAL_TAG}" \
+ --generate-notes \
+ \${PREV_TAG:+--notes-start-tag "\${PREV_TAG}"}
+ """
+ }
+ }
+ }
+ }
+ }
+
+ post {
+ cleanup {
+ cleanWs()
+ }
+ }
+}
diff --git a/.ci/jenkins/config/branch.yaml b/.ci/jenkins/config/branch.yaml
index 14a946db05c..59dfb627c9e 100644
--- a/.ci/jenkins/config/branch.yaml
+++ b/.ci/jenkins/config/branch.yaml
@@ -104,6 +104,6 @@ jenkins:
image: docker.io/apache/incubator-kie-kogito-ci-build:main-latest
args: --privileged --group-add docker
default_tools:
- jdk: jdk_17_latest
+ jdk: jdk_21_latest
maven: maven_3.9.16
- sonar_jdk: jdk_17_latest
+ sonar_jdk: jdk_21_latest
diff --git a/script/release/README.md b/script/release/README.md
index e3e71ce6e00..7cf991ed3e0 100644
--- a/script/release/README.md
+++ b/script/release/README.md
@@ -21,13 +21,19 @@
Local-first release tooling for the Apache KIE repository.
Since the 10.3.x consolidation, **drools, optaplanner, kogito-runtimes, and
-kogito-apps are all modules of the same root POM** — so the release process is
-now a single-repo, single-command workflow.
+kogito-apps are all modules of the same root POM** — so the Java release is
+a single-repo, single-command workflow.
These scripts implement the "local-first" approach: every step runs on your
machine without needing Jenkins. Jenkins can still call the same scripts, but
you no longer depend on it for the mechanics.
+> **This page is the script reference only.** Who can run a release, the
+> credentials, the Jenkins jobs, the step-by-step procedure and the
+> troubleshooting guide are in the
+> [Apache KIE Release
Procedure](https://kie.apache.org/community/devs/release-procedure)
+> (single source of truth).
+
---
## Terminology & Lifecycle Stages
@@ -51,11 +57,12 @@ Scripts are numbered to clearly communicate their intended
execution order:
| Number / Script | Automation Stage | Purpose |
|---|---|---|
-| **[`01-update-version.sh`](#01-update-versionsh)** *(alias:
`update-version.sh`)* | Automation A / D | Update Maven POM versions +
data-index image tag property |
-| **[`02-rc-commit.sh`](#02-rc-commitsh)** *(alias: `rc-commit.sh`)* |
Automation D.1 | Create temporary branch, R commit, and RC git tag |
-| **[`03-build.sh`](#03-buildsh)** *(alias: `build.sh`)* | Automation D.2 |
Build the full reactor to local `~/.m2/repository` |
-| **[`04-deploy-to-staging.sh`](#04-deploy-to-stagingsh)** *(alias:
`deploy-to-staging.sh`)* | Automation D.3 | Deploy signed JARs to Apache Nexus
staging repository |
-| **[`05-tag-release.sh`](#05-tag-releasesh)** *(alias: `tag-release.sh`)* |
Automation F | Promote an approved RC tag → final release tag |
+| **[`00-create-stream-branch.sh`](#00-create-stream-branchsh)** | Automation
A | Create the `X.Y.x` stream branch from `main` and set `X.Y.999-SNAPSHOT`
(once per minor) |
+| **[`01-update-version.sh`](#01-update-versionsh)** | Automation A / D |
Update Maven POM versions + data-index image tag property |
+| **[`02-rc-commit.sh`](#02-rc-commitsh)** | Automation D.1 | Create temporary
branch, R commit, and RC git tag |
+| **[`03-build.sh`](#03-buildsh)** | Automation D.2 | Build the full reactor
to local `~/.m2/repository` |
+| **[`04-deploy-to-staging.sh`](#04-deploy-to-stagingsh)** | Automation D.3 |
Deploy signed JARs to Apache Nexus staging repository |
+| **[`05-tag-release.sh`](#05-tag-releasesh)** | Automation F | Promote an
approved RC tag → final release tag |
| **[`release-all.sh`](#release-allsh)** | Orchestrator (D) | Orchestrate
steps 02 → 03 → 04 in one single command |
Make the scripts executable once:
@@ -98,6 +105,25 @@ pushed or published. When you are ready to share the RC:
## Scripts in detail
+### `00-create-stream-branch.sh`
+
+Creates the `X.Y.x` stream branch from a base branch and sets the development
+version `X.Y.999-SNAPSHOT` (the "D commit"). Run **once per minor version**,
+before the first RC. It fails if the branch already exists.
+
+```bash
+# See what would happen
+./script/release/00-create-stream-branch.sh 10.3.0 --dry-run
+
+# Create 10.3.x from main and push it
+./script/release/00-create-stream-branch.sh 10.3.0 --push
+
+# Cut from another base branch
+./script/release/00-create-stream-branch.sh --version 10.3 --base main --push
+```
+
+---
+
### `01-update-version.sh`
Updates every Maven module's `<version>` in the reactor and the
@@ -199,7 +225,8 @@ Promotes a winning RC tag to the final release tag
(AUTOMATION F).
### `release-all.sh`
-Orchestrates the full RC cycle in one command.
+Orchestrates the full RC cycle in one command. It does **not** create the
+stream branch (use `00-create-stream-branch.sh` for that).
```bash
./script/release/release-all.sh \
@@ -213,51 +240,60 @@ Orchestrates the full RC cycle in one command.
[--dry-run]
```
+Accepted aliases: `--rc-tag` for `--tag`, `--publish` for `--deploy`,
+`--push` for `--push-tag`, `--skip-build` for `--skip-tests`, and `--rc` (a
+no-op, kept for parity with the `incubator-kie-tools` script).
+
Steps executed in order:
-1. `02-rc-commit.sh` — R commit + tag
+1. `02-rc-commit.sh` — R commit + tag (pushed when `--push-tag` is given)
2. `03-build.sh` — full build at the tag commit
3. `04-deploy-to-staging.sh` — Nexus staging upload *(only if `--deploy`)*
+> **Note.** The reactor is built twice when `--deploy` is used: once by
+> `03-build.sh` (`install`) and again by the `deploy` goal of
+> `04-deploy-to-staging.sh`.
+
+---
+
+## Environment variables
+
+| Variable | Used by | Description |
+|---|---|---|
+| `MAVEN_SETTINGS` | `04-deploy-to-staging.sh` | Path to a `settings.xml` with
the `apache.releases.https` server |
+| `MAVEN_GPG_PASSPHRASE` | `04-deploy-to-staging.sh` | GPG passphrase.
Optional when the key has none or a GPG agent is running. Never pass it as a
CLI argument |
+
---
## Development stream vs release version
| Situation | Version | Command |
|---|---|---|
-| Daily development on `main` | `999-SNAPSHOT` | `update-version.sh
999-SNAPSHOT` |
-| Daily development on `10.3.x` | `10.3.999-SNAPSHOT` | `update-version.sh
10.3.999-SNAPSHOT` |
-| Creating RC / release | `10.3.0` | Handled automatically by `rc-commit.sh` |
+| Daily development on `main` | `999-SNAPSHOT` | `01-update-version.sh
999-SNAPSHOT` |
+| Daily development on `10.3.x` | `10.3.999-SNAPSHOT` | `01-update-version.sh
10.3.999-SNAPSHOT` |
+| Creating RC / release | `10.3.0` | Handled automatically by
`02-rc-commit.sh` |
---
## Jenkins integration
-Jenkins calls these exact same scripts. The only difference is that Jenkins
-supplies credentials via environment variables:
-
-```groovy
-withCredentials([
- file(credentialsId: 'kie-release-settings', variable: 'MAVEN_SETTINGS'),
- string(credentialsId: 'GPG_KEY_PASSPHRASE', variable:
'MAVEN_GPG_PASSPHRASE')
-]) {
- sh """
- ./script/release/release-all.sh \
- --version \${RELEASE_VERSION} \
- --tag \${GIT_TAG_NAME} \
- --skip-tests --deploy --push-tag
- """
-}
-```
+Jenkins calls these exact same scripts. The Jenkinsfiles are:
+
+| Jenkinsfile | Calls |
+|---|---|
+| `.ci/jenkins/Jenkinsfile.103xplus.release-candidate` |
`00-create-stream-branch.sh` (optional) and `release-all.sh` |
+| `.ci/jenkins/Jenkinsfile.103xplus.release-promote` | `05-tag-release.sh` |
+
+Credentials, job parameters and the failure/re-run guidance are described in
the
+[Release Procedure](https://kie.apache.org/community/devs/release-procedure).
---
## Relationship to the 10.2.x multi-repo flow
-In 10.2.x the release involved five separate repositories
-(drools → optaplanner → kogito-runtimes → kogito-apps → kie-tools), each with
-its own Jenkins job. Now that the first four repos are merged, the steps map
-as follows:
+In 10.2.x the Java release involved four separate repositories
+(drools → optaplanner → kogito-runtimes → kogito-apps), each with its own
+Jenkins job. They are now merged, so the steps map as follows:
| Old step | New equivalent |
|---|---|
@@ -265,6 +301,7 @@ as follows:
| Trigger OptaPlanner release job | *(same command — same reactor)* |
| Trigger Kogito Runtimes release job | *(same command — same reactor)* |
| Trigger Kogito Apps release job | *(same command — same reactor)* |
-| `git tag 10.x.0 10.x.0-rcN` in all repos | `./script/release/tag-release.sh`
|
+| `git tag 10.x.0 10.x.0-rcN` in all repos |
`./script/release/05-tag-release.sh` |
-`kie-tools` remains a separate repository and is unaffected by these scripts.
+`incubator-kie-tools` remains a separate repository with its own release
+scripts and is unaffected by these scripts.
diff --git a/script/release/upload_filemgmt.sh
b/script/release/upload_filemgmt.sh
deleted file mode 100755
index 50fe339e254..00000000000
--- a/script/release/upload_filemgmt.sh
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/usr/bin/env bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-set -euo pipefail
-
-# Uploads Drools release binaries and documentation to the Apache file
-# management server (people.apache.org) via SSH/rsync.
-#
-# Called by Jenkinsfile.103xplus.promote (and the original Jenkinsfile.promote)
-# inside an sshagent('drools-filemgmt') block, so SSH authentication is already
-# in the agent — no credential parameters needed here.
-#
-# Usage:
-# ./script/release/upload_filemgmt.sh <release-version>
-#
-# Examples:
-# ./script/release/upload_filemgmt.sh 10.3.0
-#
-# Environment variables (all have defaults):
-# FILEMGMT_HOST Remote host (default: people.apache.org)
-# FILEMGMT_BASE_PATH Remote base path (default: /home/drools/filemgmt)
-# DRY_RUN Set to 'true' to print commands without running them
-
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
-
-RELEASE_VERSION="${1:-}"
-
-if [[ -z "${RELEASE_VERSION}" ]]; then
- echo "ERROR: release version argument is required."
- echo "Usage: $0 <release-version>"
- echo " e.g. $0 10.3.0"
- exit 1
-fi
-
-FILEMGMT_HOST="${FILEMGMT_HOST:-people.apache.org}"
-FILEMGMT_BASE_PATH="${FILEMGMT_BASE_PATH:-/home/drools/filemgmt}"
-DRY_RUN="${DRY_RUN:-false}"
-
-# Derive major.minor stream (e.g. 10.3.0 → 10.3)
-STREAM="$(echo "${RELEASE_VERSION}" | sed 's/^\([0-9]*\.[0-9]*\)\..*/\1/')"
-
-REMOTE_BINARIES_DIR="${FILEMGMT_BASE_PATH}/downloads_htdocs/drools/release/${STREAM}.x"
-REMOTE_DOCS_DIR="${FILEMGMT_BASE_PATH}/docs_htdocs/drools/release/${STREAM}.x"
-
-echo "========================================"
-echo "Apache KIE — upload binaries & docs"
-echo "Release version : ${RELEASE_VERSION}"
-echo "Stream : ${STREAM}"
-echo "Remote host : ${FILEMGMT_HOST}"
-echo "Remote binaries : ${REMOTE_BINARIES_DIR}"
-echo "Remote docs : ${REMOTE_DOCS_DIR}"
-echo "Dry run : ${DRY_RUN}"
-echo "========================================"
-
-cd "${REPO_ROOT}"
-
-# ── Locate locally-built distribution zips ───────────────────────────────────
-# Maven -Dfull produces zip artifacts under each module's target/ directory.
-# We upload everything matching the release version.
-BINARY_ZIPS=()
-while IFS= read -r -d '' f; do
- BINARY_ZIPS+=("${f}")
-done < <(find . -path "*/target/*-${RELEASE_VERSION}*.zip" ! -path
"*/target/checkout/*" -print0 2>/dev/null)
-
-if [[ ${#BINARY_ZIPS[@]} -eq 0 ]]; then
- echo "WARNING: No distribution zips found for version ${RELEASE_VERSION}."
- echo " Run 03-build.sh with -Dfull before uploading."
-fi
-
-# ── Helper: run or echo
───────────────────────────────────────────────────────
-run() {
- if [[ "${DRY_RUN}" == "true" ]]; then
- echo "[DRY RUN] $*"
- else
- "$@"
- fi
-}
-
-# ── Create remote directories
─────────────────────────────────────────────────
-run ssh "${FILEMGMT_HOST}" "mkdir -p
'${REMOTE_BINARIES_DIR}/${RELEASE_VERSION}'
'${REMOTE_DOCS_DIR}/${RELEASE_VERSION}'"
-
-# ── Upload distribution zips
──────────────────────────────────────────────────
-if [[ ${#BINARY_ZIPS[@]} -gt 0 ]]; then
- echo ""
- echo "--- Uploading ${#BINARY_ZIPS[@]} distribution zip(s) ---"
- for zip in "${BINARY_ZIPS[@]}"; do
- echo " ${zip}"
- run rsync -avz --progress \
- "${zip}" \
- "${FILEMGMT_HOST}:${REMOTE_BINARIES_DIR}/${RELEASE_VERSION}/"
- done
-fi
-
-# ── Upload HTML documentation (if generated) ─────────────────────────────────
-DOCS_DIR="target/docs"
-if [[ -d "${DOCS_DIR}" ]]; then
- echo ""
- echo "--- Uploading docs from ${DOCS_DIR} ---"
- run rsync -avz --progress --delete \
- "${DOCS_DIR}/" \
- "${FILEMGMT_HOST}:${REMOTE_DOCS_DIR}/${RELEASE_VERSION}/"
-else
- echo "(skipping docs upload — ${DOCS_DIR} not found)"
-fi
-
-echo ""
-echo "========================================"
-echo "Upload complete for version ${RELEASE_VERSION}."
-echo "========================================"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]