Skip to content

Commit a8d958f

Browse files
sebersolebeikov
authored andcommitted
1 parent a676e5a commit a8d958f

File tree

3 files changed

+14
-21
lines changed

3 files changed

+14
-21
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ tasks.register('publish') {
6363

6464
nexusPublishing {
6565
repositories {
66-
sonatype
66+
sonatype()
6767
}
6868
}
6969

ci/release/Jenkinsfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ pipeline {
5757
stage('Release check') {
5858
steps {
5959
script {
60-
print "INFO: params.RELEASE_VERSION = ${params.RELEASE_VERSION}"
61-
print "INFO: params.DEVELOPMENT_VERSION = ${params.DEVELOPMENT_VERSION}"
62-
print "INFO: params.RELEASE_DRY_RUN? = ${params.RELEASE_DRY_RUN}"
60+
print "INFO: params.RELEASE_VERSION = ${params.RELEASE_VERSION}"
61+
print "INFO: params.DEVELOPMENT_VERSION = ${params.DEVELOPMENT_VERSION}"
62+
print "INFO: params.RELEASE_DRY_RUN? = ${params.RELEASE_DRY_RUN}"
6363

6464
// Avoid doing a release for commits from a release
6565
def lastCommitter = sh(script: 'git show -s --format=\'%an\'', returnStdout: true).trim()

ci/snapshot-publish.Jenkinsfile

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,19 @@ pipeline {
3030
}
3131
stage('Publish') {
3232
steps {
33-
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: 'GRADLE_ENTERPRISE_ACCESS_KEY'),
37-
string(credentialsId: 'release.gpg.passphrase', variable: 'SIGNING_PASS'),
38-
file(credentialsId: 'release.gpg.private-key', variable: 'SIGNING_KEYRING')
39-
]) {
33+
withCredentials([
34+
// https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-ossrh
35+
usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'ORG_GRADLE_PROJECT_sonatypePassword', usernameVariable: 'ORG_GRADLE_PROJECT_sonatypeUsername'),
36+
// https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html#account_setup
37+
usernamePassword(credentialsId: 'gradle-plugin-portal-api-key', passwordVariable: 'GRADLE_PUBLISH_SECRET', usernameVariable: 'GRADLE_PUBLISH_KEY'),
38+
file(credentialsId: 'release.gpg.private-key', variable: 'SIGNING_GPG_PRIVATE_KEY_PATH'),
39+
string(credentialsId: 'release.gpg.passphrase', variable: 'SIGNING_GPG_PASSPHRASE')
40+
gitUsernamePassword(credentialsId: 'username-and-token.Hibernate-CI.github.com', gitToolName: 'Default')
41+
]) {
4042
withEnv([
4143
"DISABLE_REMOTE_GRADLE_CACHE=true"
4244
]) {
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 \
52-
'''
45+
sh './gradlew clean publish -x test --no-scan --no-daemon --no-build-cache --stacktrace'
5346
}
5447
}
5548
}

0 commit comments

Comments
 (0)