File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,12 @@ pipeline {
161161 '''
162162 script {
163163 if ("${DEPLOYMENT_TYPE}" == 'release') {
164+ def repoTag = "${sourceRepository}".trim()
165+ if (repoTag.endsWith('/')) {
166+ repoTag = repoTag.substring(0, repoTag.length() - 1)
167+ }
168+ env.REPO_TAG = repoTag.substring(repoTag.lastIndexOf('/') + 1, repoTag.length())
169+
164170 // Documentation of the Central Portal Publisher API
165171 // - https://central.sonatype.org/publish/publish-portal-api
166172 // - https://central.sonatype.com/api-doc
@@ -172,7 +178,7 @@ pipeline {
172178 --header 'accept: text/plain' \
173179 --header 'Content-Type: multipart/form-data' \
174180 --form "bundle=@${PROJECT}-artifacts.zip" \
175- ' https://central.sonatype.com/api/v1/publisher/upload?publishingType=USER_MANAGED'
181+ " https://central.sonatype.com/api/v1/publisher/upload?name=${PROJECT^^}_${REPO_TAG}& publishingType=USER_MANAGED"
176182 ''')
177183 writeFile(file: "${WORKSPACE}/deploymentId-${PROJECT}.txt", text: "${deploymentId}")
178184 waitUntil(initialRecurrencePeriod: 5_000) {
You can’t perform that action at this time.
0 commit comments