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 {
161
161
'''
162
162
script {
163
163
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
+
164
170
// Documentation of the Central Portal Publisher API
165
171
// - https://central.sonatype.org/publish/publish-portal-api
166
172
// - https://central.sonatype.com/api-doc
@@ -172,7 +178,7 @@ pipeline {
172
178
--header 'accept: text/plain' \
173
179
--header 'Content-Type: multipart/form-data' \
174
180
--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"
176
182
''')
177
183
writeFile(file: "${WORKSPACE}/deploymentId-${PROJECT}.txt", text: "${deploymentId}")
178
184
waitUntil(initialRecurrencePeriod: 5_000) {
You can’t perform that action at this time.
0 commit comments