From df5911e0a058306387c2e2bd006a6dfa4156dbdd Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Tue, 17 Jun 2025 16:05:09 +0200 Subject: [PATCH] Add an extra parameter to control release stage: Upload/Publish (for "manual" publishing) --- ci/release/Jenkinsfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ci/release/Jenkinsfile b/ci/release/Jenkinsfile index a6c8f6f7aa14..dea3fdd62ba0 100644 --- a/ci/release/Jenkinsfile +++ b/ci/release/Jenkinsfile @@ -95,6 +95,11 @@ pipeline { defaultValue: false, description: 'If true, just simulate the release, without pushing any commits or tags, and without uploading any artifacts or documentation.' ) + booleanParam( + name: 'RELEASE_PUBLISH_AUTOMATICALLY', + defaultValue: true, + description: 'If true, staging repository will get closed and published automatically, otherwise the artifacts will only be uploaded and the publishing (releasing the staging repository) has to be performed manually at Maven Central portal.' + ) } stages { stage('Check') { @@ -166,6 +171,9 @@ pipeline { env.DEVELOPMENT_VERSION = developmentVersion.toString() env.SCRIPT_OPTIONS = params.RELEASE_DRY_RUN ? "-d" : "" env.JRELEASER_DRY_RUN = params.RELEASE_DRY_RUN + if (!params.RELEASE_PUBLISH_AUTOMATICALLY) { + env.JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_STAGE='UPLOAD' + } // Determine version id to check if Jira version exists sh ".release/scripts/determine-jira-version-id.sh ${env.JIRA_KEY} ${releaseVersion.withoutFinalQualifier}"