Skip to content

Commit

Permalink
HHH-18912 - ORM release process
Browse files Browse the repository at this point in the history
  • Loading branch information
sebersole committed Dec 18, 2024
1 parent 711033d commit 5932f45
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ tasks.register('publish') {

nexusPublishing {
repositories {
sonatype
sonatype()
}
}

Expand Down
6 changes: 3 additions & 3 deletions ci/release/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ pipeline {
stage('Release check') {
steps {
script {
print "INFO: params.RELEASE_VERSION = ${params.RELEASE_VERSION}"
print "INFO: params.DEVELOPMENT_VERSION = ${params.DEVELOPMENT_VERSION}"
print "INFO: params.RELEASE_DRY_RUN? = ${params.RELEASE_DRY_RUN}"
print "INFO: params.RELEASE_VERSION = ${params.RELEASE_VERSION}"
print "INFO: params.DEVELOPMENT_VERSION = ${params.DEVELOPMENT_VERSION}"
print "INFO: params.RELEASE_DRY_RUN? = ${params.RELEASE_DRY_RUN}"

// Avoid doing a release for commits from a release
def lastCommitter = sh(script: 'git show -s --format=\'%an\'', returnStdout: true).trim()
Expand Down
27 changes: 10 additions & 17 deletions ci/snapshot-publish.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,19 @@ 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: 'GRADLE_ENTERPRISE_ACCESS_KEY'),
string(credentialsId: 'release.gpg.passphrase', variable: 'SIGNING_PASS'),
file(credentialsId: 'release.gpg.private-key', variable: 'SIGNING_KEYRING')
]) {
withCredentials([
// 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')
gitUsernamePassword(credentialsId: 'username-and-token.Hibernate-CI.github.com', gitToolName: 'Default')
]) {
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 5932f45

Please sign in to comment.