Skip to content

Commit 9c4d33b

Browse files
committed
Various release script fixes
1 parent e685425 commit 9c4d33b

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

ci/release/Jenkinsfile

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ pipeline {
9292
stage('Release check') {
9393
steps {
9494
script {
95-
print "INFO: params.RELEASE_VERSION = ${params.RELEASE_VERSION}"
96-
print "INFO: params.DEVELOPMENT_VERSION = ${params.DEVELOPMENT_VERSION}"
97-
print "INFO: params.RELEASE_DRY_RUN? = ${params.RELEASE_DRY_RUN}"
95+
print "INFO: params.RELEASE_VERSION = ${params.RELEASE_VERSION}"
96+
print "INFO: params.DEVELOPMENT_VERSION = ${params.DEVELOPMENT_VERSION}"
97+
print "INFO: params.RELEASE_DRY_RUN? = ${params.RELEASE_DRY_RUN}"
9898

9999
checkoutReleaseScripts()
100100

@@ -111,7 +111,9 @@ pipeline {
111111
echo "Release was requested manually"
112112

113113
if ( !params.RELEASE_VERSION ) {
114-
throw new IllegalArgumentException( 'Missing value for parameter RELEASE_VERSION. This parameter must be set explicitly to prevent mistakes.' )
114+
throw new IllegalArgumentException(
115+
'Missing value for parameter RELEASE_VERSION. This parameter must be set explicitly to prevent mistakes.'
116+
)
115117
}
116118
releaseVersion = Version.parseReleaseVersion( params.RELEASE_VERSION )
117119

@@ -168,20 +170,20 @@ pipeline {
168170
configFile(fileId: 'release.config.ssh', targetLocation: "${env.HOME}/.ssh/config"),
169171
configFile(fileId: 'release.config.ssh.knownhosts', targetLocation: "${env.HOME}/.ssh/known_hosts")
170172
]) {
171-
sshagent(['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'hibernate-ci.frs.sourceforge.net']) {
172-
// set release version
173-
// update changelog from JIRA
174-
// tags the version
175-
// changes the version to the provided development version
176-
withEnv([
177-
"BRANCH=${env.GIT_BRANCH}",
178-
"DISABLE_REMOTE_GRADLE_CACHE=true",
179-
// Increase the amount of memory for this part since asciidoctor doc rendering consumes a lot of metaspace
180-
"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'"
181-
]) {
182-
sh ".release/scripts/prepare-release.sh ${env.PROJECT} ${env.RELEASE_VERSION} ${env.DEVELOPMENT_VERSION}"
183-
}
184-
}
173+
sshagent(['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'hibernate-ci.frs.sourceforge.net']) {
174+
// set release version
175+
// update changelog from JIRA
176+
// tags the version
177+
// changes the version to the provided development version
178+
withEnv([
179+
"BRANCH=${env.GIT_BRANCH}",
180+
"DISABLE_REMOTE_GRADLE_CACHE=true",
181+
// Increase the amount of memory for this part since asciidoctor doc rendering consumes a lot of metaspace
182+
"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'"
183+
]) {
184+
sh ".release/scripts/prepare-release.sh ${env.PROJECT} ${env.RELEASE_VERSION} ${env.DEVELOPMENT_VERSION}"
185+
}
186+
}
185187
}
186188
}
187189
}

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)