Skip to content

Commit

Permalink
Try to fix snapshot publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
beikov committed Dec 18, 2024
1 parent 0b035dc commit 28b8157
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions ci/snapshot-publish.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,22 @@ pipeline {
stage('Publish') {
steps {
withCredentials([
usernamePassword(credentialsId: 'ossrh.sonatype.org', usernameVariable: 'hibernatePublishUsername', passwordVariable: 'hibernatePublishPassword'),
usernamePassword(credentialsId: 'plugins.gradle.org', usernameVariable: 'hibernatePluginPortalUsername', passwordVariable: 'hibernatePluginPortalPassword'),
string(credentialsId: 'ge.hibernate.org-access-key', variable: 'DEVELOCITY_ACCESS_KEY'),
string(credentialsId: 'release.gpg.passphrase', variable: 'SIGNING_PASS'),
file(credentialsId: 'release.gpg.private-key', variable: 'SIGNING_KEYRING')
usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'OSSRH_PASSWORD', usernameVariable: 'OSSRH_USER'),
usernamePassword(credentialsId: 'gradle-plugin-portal-api-key', passwordVariable: 'PLUGIN_PORTAL_PASSWORD', usernameVariable: 'PLUGIN_PORTAL_USERNAME'),
file(credentialsId: 'release.gpg.private-key', variable: 'RELEASE_GPG_PRIVATE_KEY_PATH'),
string(credentialsId: 'release.gpg.passphrase', variable: 'RELEASE_GPG_PASSPHRASE'),
// https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-ossrh
usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'ORG_GRADLE_PROJECT_sonatypePassword', usernameVariable: 'ORG_GRADLE_PROJECT_sonatypeUsername'),
// https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html#account_setup
usernamePassword(credentialsId: 'gradle-plugin-portal-api-key', passwordVariable: 'GRADLE_PUBLISH_SECRET', usernameVariable: 'GRADLE_PUBLISH_KEY'),
file(credentialsId: 'release.gpg.private-key', variable: 'SIGNING_GPG_PRIVATE_KEY_PATH'),
string(credentialsId: 'release.gpg.passphrase', variable: 'SIGNING_GPG_PASSPHRASE')
]) {
withEnv([
"DISABLE_REMOTE_GRADLE_CACHE=true"
]) {
sh '''./gradlew clean publish \
-PhibernatePublishUsername=$hibernatePublishUsername \
-PhibernatePublishPassword=$hibernatePublishPassword \
-Pgradle.publish.key=$hibernatePluginPortalUsername \
-Pgradle.publish.secret=$hibernatePluginPortalPassword \
--no-scan \
--no-build-cache \
-DsigningPassword=$SIGNING_PASS \
-DsigningKeyFile=$SIGNING_KEYRING \
sh '''./gradlew clean publish -x test \
--no-scan --no-daemon --no-build-cache --stacktrace
'''
}
}
Expand Down

0 comments on commit 28b8157

Please sign in to comment.