Skip to content

Commit df5911e

Browse files
committed
Add an extra parameter to control release stage: Upload/Publish (for "manual" publishing)
1 parent c2be33d commit df5911e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ci/release/Jenkinsfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ pipeline {
9595
defaultValue: false,
9696
description: 'If true, just simulate the release, without pushing any commits or tags, and without uploading any artifacts or documentation.'
9797
)
98+
booleanParam(
99+
name: 'RELEASE_PUBLISH_AUTOMATICALLY',
100+
defaultValue: true,
101+
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.'
102+
)
98103
}
99104
stages {
100105
stage('Check') {
@@ -166,6 +171,9 @@ pipeline {
166171
env.DEVELOPMENT_VERSION = developmentVersion.toString()
167172
env.SCRIPT_OPTIONS = params.RELEASE_DRY_RUN ? "-d" : ""
168173
env.JRELEASER_DRY_RUN = params.RELEASE_DRY_RUN
174+
if (!params.RELEASE_PUBLISH_AUTOMATICALLY) {
175+
env.JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_STAGE='UPLOAD'
176+
}
169177

170178
// Determine version id to check if Jira version exists
171179
sh ".release/scripts/determine-jira-version-id.sh ${env.JIRA_KEY} ${releaseVersion.withoutFinalQualifier}"

0 commit comments

Comments
 (0)