Skip to content

Commit a2dd3cb

Browse files
authored
ci: updating publish to use closeAndReleaseSonatypeStagingRepository (#36)
**Related issues** SC-245941 **Describe the solution you've provided** At some point in the past, a community nexus staging plugin was used which had task 'closeAndReleaseRepository'. This appears to no longer successfully close staging repositories as it once did, so switching to 'closeAndReleaseSonatypeStagingRepository' which is a task supported by the official nexus plugin.
1 parent d1f0434 commit a2dd3cb

File tree

6 files changed

+3
-23
lines changed

6 files changed

+3
-23
lines changed

.github/actions/publish/publish.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ else
1414
}
1515
else
1616
echo "RELEASE"
17-
${WORKSPACE_PATH}/gradlew publishToSonatype closeAndReleaseRepository -p ${WORKSPACE_PATH} -Psigning.keyId="${SIGNING_KEY_ID}" -Psigning.password="${SIGNING_KEY_PASSPHRASE}" -Psigning.secretKeyRingFile="${SIGNING_SECRET_KEY_RING_FILE}" -PsonatypeUsername="${SONATYPE_USER_NAME}" -PsonatypePassword="${SONATYPE_PASSWORD}" || {
17+
${WORKSPACE_PATH}/gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -p ${WORKSPACE_PATH} -Psigning.keyId="${SIGNING_KEY_ID}" -Psigning.password="${SIGNING_KEY_PASSPHRASE}" -Psigning.secretKeyRingFile="${SIGNING_SECRET_KEY_RING_FILE}" -PsonatypeUsername="${SONATYPE_USER_NAME}" -PsonatypePassword="${SONATYPE_PASSWORD}" || {
1818
echo "Gradle publish/release failed" >&2
1919
exit 1
2020
}

lib/sdk/server/build.gradle

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ plugins {
2222
id "com.github.johnrengelman.shadow" version "7.1.2"
2323
id "maven-publish"
2424
id "io.github.gradle-nexus.publish-plugin" version "1.3.0" apply false
25-
id "io.codearte.nexus-staging" version "0.21.2"
2625
id "org.ajoberstar.git-publish" version "2.1.3"
2726
id "idea"
2827
}
@@ -546,11 +545,6 @@ idea {
546545
}
547546
}
548547

549-
nexusStaging {
550-
packageGroup = "com.launchdarkly"
551-
numberOfRetries = 40 // we've seen extremely long delays in closing repositories
552-
}
553-
554548
def pomConfig = {
555549
name 'LaunchDarkly SDK for Java'
556550
packaging 'jar'

lib/shared/common/build.gradle.kts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ publishing {
8080
}
8181
}
8282

83-
nexusStaging {
84-
packageGroup = ProjectValues.groupId
85-
numberOfRetries = 40 // we've seen extremely long delays in closing repositories
86-
}
87-
8883
nexusPublishing {
8984
clientTimeout.set(Duration.ofMinutes(2)) // we've seen extremely long delays in creating repositories
9085
repositories {

lib/shared/common/buildSrc/src/main/kotlin/Dependencies.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ object Versions {
1010

1111
object PluginVersions {
1212
const val nexusPublish = "1.3.0"
13-
const val nexusStaging = "0.30.0"
1413
}
1514

1615
object Libs {
@@ -61,7 +60,6 @@ object Libs {
6160
)
6261

6362
val javaExtGradlePlugins = mapOf(
64-
"io.github.gradle-nexus.publish-plugin" to PluginVersions.nexusPublish,
65-
"io.codearte.nexus-staging" to PluginVersions.nexusStaging
63+
"io.github.gradle-nexus.publish-plugin" to PluginVersions.nexusPublish
6664
)
6765
}

lib/shared/internal/build.gradle.kts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ publishing {
7474
}
7575
}
7676

77-
nexusStaging {
78-
packageGroup = ProjectValues.groupId
79-
numberOfRetries = 40 // we've seen extremely long delays in closing repositories
80-
}
81-
8277
nexusPublishing {
8378
clientTimeout.set(Duration.ofMinutes(2)) // we've seen extremely long delays in creating repositories
8479
repositories {

lib/shared/internal/buildSrc/src/main/kotlin/Dependencies.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ object Versions {
1212

1313
object PluginVersions {
1414
const val nexusPublish = "1.3.0"
15-
const val nexusStaging = "0.30.0"
1615
}
1716

1817
object Libs {
@@ -52,7 +51,6 @@ object Libs {
5251
)
5352

5453
val javaExtGradlePlugins = mapOf(
55-
"io.github.gradle-nexus.publish-plugin" to PluginVersions.nexusPublish,
56-
"io.codearte.nexus-staging" to PluginVersions.nexusStaging
54+
"io.github.gradle-nexus.publish-plugin" to PluginVersions.nexusPublish
5755
)
5856
}

0 commit comments

Comments
 (0)