@@ -170,6 +170,7 @@ pipeline {
170
170
env. RELEASE_VERSION = releaseVersion. toString()
171
171
env. DEVELOPMENT_VERSION = developmentVersion. toString()
172
172
env. SCRIPT_OPTIONS = params. RELEASE_DRY_RUN ? " -d" : " "
173
+ env. JRELEASER_DRY_RUN = params. RELEASE_DRY_RUN
173
174
174
175
// Determine version id to check if Jira version exists
175
176
sh " .release/scripts/determine-jira-version-id.sh ${ env.JIRA_KEY} ${ releaseVersion.withoutFinalQualifier} "
@@ -191,12 +192,11 @@ pipeline {
191
192
// tags the version
192
193
// changes the version to the provided development version
193
194
withEnv([
194
- " BRANCH=${ env.GIT_BRANCH} " ,
195
195
" DISABLE_REMOTE_GRADLE_CACHE=true" ,
196
196
// Increase the amount of memory for this part since asciidoctor doc rendering consumes a lot of metaspace
197
197
" GRADLE_OPTS=-Dorg.gradle.jvmargs='-Dlog4j2.disableJmx -Xmx4g -XX:MaxMetaspaceSize=768m -XX:+HeapDumpOnOutOfMemoryError -Duser.language=en -Duser.country=US -Duser.timezone=UTC -Dfile.encoding=UTF-8'"
198
198
]) {
199
- sh " .release/scripts/prepare-release.sh ${ env.PROJECT } ${ env.RELEASE_VERSION } ${ env.DEVELOPMENT_VERSION } "
199
+ sh " .release/scripts/prepare-release.sh -j -b ${ env.GIT_BRANCH } -v ${ env.DEVELOPMENT_VERSION } ${ env.PROJECT } ${ env.RELEASE_VERSION } "
200
200
}
201
201
}
202
202
}
@@ -214,20 +214,28 @@ pipeline {
214
214
]) {
215
215
withCredentials([
216
216
// https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-ossrh
217
- usernamePassword(credentialsId : ' ossrh.sonatype.org' , passwordVariable : ' ORG_GRADLE_PROJECT_sonatypePassword' , usernameVariable : ' ORG_GRADLE_PROJECT_sonatypeUsername' ),
217
+ // TODO: HHH-19309:
218
+ // Once we switch to maven-central publishing (from nexus2) we need to add a new credentials
219
+ // to use the following env variable names to set the user/password:
220
+ // - JRELEASER_MAVENCENTRAL_USERNAME
221
+ // - JRELEASER_MAVENCENTRAL_TOKEN
222
+ // Also use the new `credentialsId` for Maven Central, e.g.:
223
+ // usernamePassword(credentialsId: '???????', passwordVariable: 'JRELEASER_MAVENCENTRAL_TOKEN', usernameVariable: 'JRELEASER_MAVENCENTRAL_USERNAME'),
224
+ usernamePassword(credentialsId : ' ossrh.sonatype.org' , passwordVariable : ' JRELEASER_NEXUS2_PASSWORD' , usernameVariable : ' JRELEASER_NEXUS2_USERNAME' ),
218
225
// https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html#account_setup
219
226
usernamePassword(credentialsId : ' gradle-plugin-portal-api-key' , passwordVariable : ' GRADLE_PUBLISH_SECRET' , usernameVariable : ' GRADLE_PUBLISH_KEY' ),
220
- file(credentialsId : ' release.gpg.private-key' , variable : ' SIGNING_GPG_PRIVATE_KEY_PATH' ),
221
- string(credentialsId : ' release.gpg.passphrase' , variable : ' SIGNING_GPG_PASSPHRASE' ),
222
- gitUsernamePassword(credentialsId : ' username-and-token.Hibernate-CI.github.com' , gitToolName : ' Default' )
227
+ gitUsernamePassword(credentialsId : ' username-and-token.Hibernate-CI.github.com' , gitToolName : ' Default' ),
228
+ file(credentialsId : ' release.gpg.private-key' , variable : ' RELEASE_GPG_PRIVATE_KEY_PATH' ),
229
+ string(credentialsId : ' release.gpg.passphrase' , variable : ' JRELEASER_GPG_PASSPHRASE' ),
230
+ string(credentialsId : ' Hibernate-CI.github.com' , variable : ' JRELEASER_GITHUB_TOKEN' )
223
231
]) {
224
232
sshagent([' ed25519.Hibernate-CI.github.com' , ' hibernate.filemgmt.jboss.org' , ' hibernate-ci.frs.sourceforge.net' ]) {
225
233
// performs documentation upload and Sonatype release
226
234
// push to github
227
235
withEnv([
228
236
" DISABLE_REMOTE_GRADLE_CACHE=true"
229
237
]) {
230
- sh " .release/scripts/publish.sh ${ env.SCRIPT_OPTIONS} ${ env.PROJECT} ${ env.RELEASE_VERSION} ${ env.DEVELOPMENT_VERSION} ${ env.GIT_BRANCH} "
238
+ sh " .release/scripts/publish.sh -j ${ env.SCRIPT_OPTIONS} ${ env.PROJECT} ${ env.RELEASE_VERSION} ${ env.DEVELOPMENT_VERSION} ${ env.GIT_BRANCH} "
231
239
}
232
240
}
233
241
}
0 commit comments