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 10c39cb825c test
10c39cb825c is described below
commit 10c39cb825c724d538ffebead7e277e013e52fa2
Author: Kusuma <[email protected]>
AuthorDate: Wed Oct 21 19:08:07 2026 +0530
test
---
.ci/jenkins/Jenkinsfile.103xplus.release-publish | 55 ++++++++++++++----------
.ci/jenkins/shared-scripts/releaseUtils.groovy | 11 ++---
scripts/release/release-all.sh | 11 +++--
3 files changed, 47 insertions(+), 30 deletions(-)
diff --git a/.ci/jenkins/Jenkinsfile.103xplus.release-publish
b/.ci/jenkins/Jenkinsfile.103xplus.release-publish
index 3b992d0eb1b..2576eb7b670 100644
--- a/.ci/jenkins/Jenkinsfile.103xplus.release-publish
+++ b/.ci/jenkins/Jenkinsfile.103xplus.release-publish
@@ -53,7 +53,7 @@ pipeline {
)
string(
name: 'GITHUB_RELEASE_TAG',
- description: 'GitHub release tag (for uploading assets to the
GitHub Release)',
+ description: 'GitHub release tag (required: binary assets are
uploaded to this existing GitHub Release)',
defaultValue: ''
)
}
@@ -90,6 +90,24 @@ pipeline {
}
stages {
+ stage('Validate parameters') {
+ steps {
+ script {
+ if (params.RELEASE_VERSION == '' || params.RELEASE_VERSION
== '0.0.0') {
+ error("RELEASE_VERSION must be set to the voted
release version")
+ }
+ if (params.BASE_REF == '' || params.BASE_REF ==
'0.0.0-rc1') {
+ error("BASE_REF must be set to the voted RC tag")
+ }
+ // release-all.sh --publish uploads binary assets to the
GitHub Release and fails without it,
+ // after other registries would already have been
published. Fail fast instead.
+ if (params.GITHUB_RELEASE_TAG == '') {
+ error("GITHUB_RELEASE_TAG must be set to an existing
GitHub Release tag")
+ }
+ }
+ }
+ }
+
stage('Load local shared scripts') {
steps {
script {
@@ -134,7 +152,7 @@ pipeline {
script {
def packageVersion = sh(
returnStdout: true,
- script: "node -p
\"require('./package.json').version\""
+ script: "#!/bin/bash -el \n node -p
\"require('./package.json').version\""
).trim()
if (packageVersion != params.RELEASE_VERSION) {
@@ -189,24 +207,19 @@ pipeline {
string(credentialsId:
"${pipelineVars.dockerHubTokenCredentialsId}", variable:
'HELM_PASSWORD'),
string(credentialsId:
"${pipelineVars.kieToolsBotGithubTokenCredentialsId}", variable:
'GITHUB_TOKEN')
]) {
- script {
- def uploadUrlFlag = ''
- if (params.GITHUB_RELEASE_TAG != '') {
- def releaseJson = sh(
- returnStdout: true,
- script: """
- curl -sSf -H "Authorization: token
\${GITHUB_TOKEN}" \
-
"https://api.github.com/repos/${pipelineVars.githubRepositorySlug}/releases/tags/${params.GITHUB_RELEASE_TAG}"
- """
- ).trim()
- def releaseInfo = readJSON text:
releaseJson
- uploadUrlFlag = "--upload-url
'${releaseInfo.upload_url.replaceAll('\\{.*\\}', '')}'"
- }
-
- sh """#!/bin/bash -el
- ./scripts/release/release-all.sh
${params.RELEASE_VERSION} --publish ${uploadUrlFlag}
+ def releaseJson = sh(
+ returnStdout: true,
+ script: """#!/bin/bash -el
+ set +x
+ curl -sSf -H "Authorization: token
\${GITHUB_TOKEN}"
"https://api.github.com/repos/${pipelineVars.githubRepositorySlug}/releases/tags/${params.GITHUB_RELEASE_TAG}"
"""
- }
+ ).trim()
+ def releaseInfo = readJSON text: releaseJson
+ def uploadUrl =
githubUtils.parseReleaseAssetUploadUrl("${releaseInfo.upload_url}")
+
+ sh """#!/bin/bash -el
+ ./scripts/release/release-all.sh
${params.RELEASE_VERSION} --publish --upload-url '${uploadUrl}'
+ """
}
}
}
@@ -228,9 +241,7 @@ pipeline {
echo " ✅ Container registry"
echo " ✅ Helm registry"
echo " ✅ GitHub Pages"
- if (params.GITHUB_RELEASE_TAG != '') {
- echo " ✅ GitHub Release: ${params.GITHUB_RELEASE_TAG}"
- }
+ echo " ✅ GitHub Release: ${params.GITHUB_RELEASE_TAG}"
echo ""
echo "Next steps:"
echo "1. Verify packages are available in registries"
diff --git a/.ci/jenkins/shared-scripts/releaseUtils.groovy
b/.ci/jenkins/shared-scripts/releaseUtils.groovy
index 7bf69554ba5..66dba381f07 100644
--- a/.ci/jenkins/shared-scripts/releaseUtils.groovy
+++ b/.ci/jenkins/shared-scripts/releaseUtils.groovy
@@ -44,7 +44,9 @@ def publishArtifacts(String artifactsDir, String
releaseRepository, String relea
withCredentials([usernamePassword(credentialsId: credentialsId,
usernameVariable: 'ASF_USERNAME', passwordVariable: 'ASF_PASSWORD')]) {
sh """#!/bin/bash -el
SVN_URL="${releaseRepository}/${releaseVersion}"
- rm -rf svn-kie
+ # Check out the SVN working copy outside of the artifacts directory,
so it is not copied into itself.
+ SVN_WORKDIR=\$(mktemp -d)/svn-kie
+ trap 'rm -rf "\$(dirname "\${SVN_WORKDIR}")"' EXIT
# Create the RC directory in the SVN staging repository when it does
not exist yet.
# Only a "path does not exist" error triggers the creation; any other
failure (network, auth, ...) aborts.
@@ -59,12 +61,11 @@ def publishArtifacts(String artifactsDir, String
releaseRepository, String relea
exit 1
fi
- svn co --depth=empty "\${SVN_URL}" svn-kie
- cp ${artifactsDir}/* svn-kie
- cd svn-kie
+ svn co --depth=empty "\${SVN_URL}" "\${SVN_WORKDIR}"
+ find "${artifactsDir}" -maxdepth 1 -type f -exec cp {}
"\${SVN_WORKDIR}" \\;
+ cd "\${SVN_WORKDIR}"
svn add . --force
svn ci --non-interactive --no-auth-cache --username \${ASF_USERNAME}
--password "\${ASF_PASSWORD}" -m "Apache KIE ${releaseVersion} artifacts"
- rm -rf svn-kie
""".trim()
}
}
diff --git a/scripts/release/release-all.sh b/scripts/release/release-all.sh
index af8ff40d8b4..12fb1abfed6 100755
--- a/scripts/release/release-all.sh
+++ b/scripts/release/release-all.sh
@@ -191,7 +191,7 @@ release_chrome_extensions() {
local kie_editors_zip
kie_editors_zip=$(find
"packages/chrome-extension-pack-kogito-kie-editors/dist" \
- -maxdepth 1 -name "chrome_extension_kogito_kie_editors_*.zip"
2>/dev/null | head -1)
+ -maxdepth 1 -name "chrome_extension_kogito_kie_editors_*.zip"
2>/dev/null | head -1 || true)
if [[ -z "${kie_editors_zip}" ]]; then
echo "ERROR: chrome_extension_kogito_kie_editors_*.zip not found — was
the build successful?"
return 1
@@ -299,7 +299,7 @@ release_vscode() {
for ext in "${!EXTENSIONS[@]}"; do
local suffix="${EXTENSIONS[$ext]}"
local vsix
- vsix=$(find "packages/${ext}" -maxdepth 2 -name "*.vsix"
2>/dev/null | head -1)
+ vsix=$(find "packages/${ext}" -maxdepth 2 -name "*.vsix"
2>/dev/null | head -1 || true)
if [[ -n "${vsix}" ]]; then
local
dest="${ARTIFACTS_DIR}/apache-kie-${VERSION}-incubating-${suffix}.vsix"
echo " COPY $(basename "${dest}")"
@@ -736,10 +736,15 @@ FAILED=()
run_step() {
local name="$1" fn="$2"
local status=0
+ # Run the step as a standalone command (not as part of an `||`/`&&`/`if`
list), otherwise bash
+ # ignores `set -e` inside it and a failed command in the middle of a step
would go unnoticed.
+ set +e
(
set -euo pipefail
"${fn}"
- ) || status=$?
+ )
+ status=$?
+ set -e
if [[ ${status} -eq 0 ]]; then
echo "✅ ${name} — OK"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]