Skip to content

Commit 28b8157

Browse files
committed
Try to fix snapshot publishing
1 parent 0b035dc commit 28b8157

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

ci/snapshot-publish.Jenkinsfile

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,22 @@ pipeline {
3131
stage('Publish') {
3232
steps {
3333
withCredentials([
34-
usernamePassword(credentialsId: 'ossrh.sonatype.org', usernameVariable: 'hibernatePublishUsername', passwordVariable: 'hibernatePublishPassword'),
35-
usernamePassword(credentialsId: 'plugins.gradle.org', usernameVariable: 'hibernatePluginPortalUsername', passwordVariable: 'hibernatePluginPortalPassword'),
36-
string(credentialsId: 'ge.hibernate.org-access-key', variable: 'DEVELOCITY_ACCESS_KEY'),
37-
string(credentialsId: 'release.gpg.passphrase', variable: 'SIGNING_PASS'),
38-
file(credentialsId: 'release.gpg.private-key', variable: 'SIGNING_KEYRING')
34+
usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'OSSRH_PASSWORD', usernameVariable: 'OSSRH_USER'),
35+
usernamePassword(credentialsId: 'gradle-plugin-portal-api-key', passwordVariable: 'PLUGIN_PORTAL_PASSWORD', usernameVariable: 'PLUGIN_PORTAL_USERNAME'),
36+
file(credentialsId: 'release.gpg.private-key', variable: 'RELEASE_GPG_PRIVATE_KEY_PATH'),
37+
string(credentialsId: 'release.gpg.passphrase', variable: 'RELEASE_GPG_PASSPHRASE'),
38+
// https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-ossrh
39+
usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'ORG_GRADLE_PROJECT_sonatypePassword', usernameVariable: 'ORG_GRADLE_PROJECT_sonatypeUsername'),
40+
// https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html#account_setup
41+
usernamePassword(credentialsId: 'gradle-plugin-portal-api-key', passwordVariable: 'GRADLE_PUBLISH_SECRET', usernameVariable: 'GRADLE_PUBLISH_KEY'),
42+
file(credentialsId: 'release.gpg.private-key', variable: 'SIGNING_GPG_PRIVATE_KEY_PATH'),
43+
string(credentialsId: 'release.gpg.passphrase', variable: 'SIGNING_GPG_PASSPHRASE')
3944
]) {
4045
withEnv([
4146
"DISABLE_REMOTE_GRADLE_CACHE=true"
4247
]) {
43-
sh '''./gradlew clean publish \
44-
-PhibernatePublishUsername=$hibernatePublishUsername \
45-
-PhibernatePublishPassword=$hibernatePublishPassword \
46-
-Pgradle.publish.key=$hibernatePluginPortalUsername \
47-
-Pgradle.publish.secret=$hibernatePluginPortalPassword \
48-
--no-scan \
49-
--no-build-cache \
50-
-DsigningPassword=$SIGNING_PASS \
51-
-DsigningKeyFile=$SIGNING_KEYRING \
48+
sh '''./gradlew clean publish -x test \
49+
--no-scan --no-daemon --no-build-cache --stacktrace
5250
'''
5351
}
5452
}

0 commit comments

Comments
 (0)