Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@ apply from: file( 'gradle/module.gradle' )
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Release Task

tasks.register('release') {
description = "The task performed when we are performing a release build. Relies on " +
"the fact that subprojects will appropriately define a release task " +
"themselves if they have any release-related activities to perform"

doFirst {
def javaVersionsInUse = jdkVersions.allVersions
if (javaVersionsInUse != [JavaLanguageVersion.of(11)].toSet()) {
throw new IllegalStateException("Please use JDK 11 to perform the release. Currently using: ${javaVersionsInUse}")
}
}
}

tasks.register('publish') {
description = "The task performed when we want to just publish maven artifacts. Relies on " +
"the fact that subprojects will appropriately define a release task " +
Expand Down
26 changes: 12 additions & 14 deletions ci/release/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ pipeline {
configFile(fileId: 'release.config.ssh', targetLocation: "${env.HOME}/.ssh/config"),
configFile(fileId: 'release.config.ssh.knownhosts', targetLocation: "${env.HOME}/.ssh/known_hosts")
]) {
sshagent(['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'hibernate-ci.frs.sourceforge.net']) {
sshagent(['ed25519.Hibernate-CI.github.com', 'hibernate-ci.frs.sourceforge.net']) {
// set release version
// update changelog from JIRA
// tags the version
Expand Down Expand Up @@ -217,13 +217,21 @@ pipeline {
string(credentialsId: 'release.gpg.passphrase', variable: 'JRELEASER_GPG_PASSPHRASE'),
string(credentialsId: 'Hibernate-CI.github.com', variable: 'JRELEASER_GITHUB_TOKEN')
]) {
sshagent(['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'jenkins.in.relation.to', 'hibernate-ci.frs.sourceforge.net']) {
sshagent(['ed25519.Hibernate-CI.github.com', 'jenkins.in.relation.to', 'hibernate-ci.frs.sourceforge.net']) {
// performs documentation upload and Sonatype release
// push to github
withEnv([
"DISABLE_REMOTE_GRADLE_CACHE=true"
]) {
sh ".release/scripts/publish.sh -j ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION} ${env.DEVELOPMENT_VERSION} ${env.GIT_BRANCH}"
def notesFiles = findFiles(glob: 'release_notes.md')
if ( notesFiles.length < 1 ) {
throw new IllegalStateException( "Could not locate `release_notes.md`" )
}
if ( notesFiles.length > 1 ) {
throw new IllegalStateException( "Located more than 1 `release_notes.md`" )
}

sh ".release/scripts/publish.sh -j --notes=${notesFiles[0].path} ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION} ${env.DEVELOPMENT_VERSION} ${env.GIT_BRANCH} "
}
}
}
Expand Down Expand Up @@ -254,7 +262,7 @@ pipeline {
withCredentials([
gitUsernamePassword(credentialsId: 'username-and-token.Hibernate-CI.github.com', gitToolName: 'Default')
]) {
sshagent( ['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'hibernate-ci.frs.sourceforge.net'] ) {
sshagent( ['ed25519.Hibernate-CI.github.com'] ) {
dir( '.release/hibernate.org' ) {
// Lock to avoid rejected pushes when multiple releases try to clone-commit-push
lock('hibernate.org-git') {
Expand All @@ -272,16 +280,6 @@ pipeline {
}
}
}
stage('Create GitHub release') {
steps {
script {
checkoutReleaseScripts()
withCredentials([string(credentialsId: 'Hibernate-CI.github.com', variable: 'GITHUB_API_TOKEN')]) {
sh ".release/scripts/github-release.sh ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION}"
}
}
}
}
}
post {
always {
Expand Down
5 changes: 0 additions & 5 deletions documentation/documentation.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ repositories {


apply from: rootProject.file( 'gradle/module.gradle' )
apply from: rootProject.file( 'gradle/releasable.gradle' )

apply plugin: 'org.hibernate.orm.build.reports'

Expand Down Expand Up @@ -194,10 +193,6 @@ dependencies {
if ( project.ormVersion.isSnapshot ) {
// only run the ci build tasks for SNAPSHOT versions
tasks.register('ciBuild') { dependsOn clean }
tasks.release.enabled false
}
else {
tasks.release.dependsOn clean
}


Expand Down
20 changes: 13 additions & 7 deletions gradle/published-java-module.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
*/

apply from: rootProject.file( 'gradle/releasable.gradle' )
apply from: rootProject.file( 'gradle/java-module.gradle' )
apply from: rootProject.file( 'gradle/publishing-pom.gradle' )

Expand Down Expand Up @@ -102,12 +101,19 @@ task ciBuild {
dependsOn test
}

tasks.release.dependsOn tasks.test

tasks.preVerifyRelease.dependsOn build
tasks.preVerifyRelease.dependsOn generateMetadataFileForPublishedArtifactsPublication
tasks.preVerifyRelease.dependsOn generatePomFileForPublishedArtifactsPublication
tasks.preVerifyRelease.dependsOn generatePomFileForRelocationPomPublication
task releasePrepare {
group 'Release'
description 'Performs release preparations on local check-out, including updating changelog'

dependsOn build
dependsOn generateMetadataFileForPublishedArtifactsPublication
dependsOn generatePomFileForPublishedArtifactsPublication
dependsOn generatePomFileForRelocationPomPublication
dependsOn generatePomFileForRelocationPomPublication
// we depend on publishAllPublicationsToStagingRepository to make sure that the artifacts are "published" to a local staging directory
// used by JReleaser during the release process
dependsOn publishAllPublicationsToStagingRepository
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Ancillary tasks
Expand Down
10 changes: 0 additions & 10 deletions gradle/releasable.gradle

This file was deleted.

1 change: 0 additions & 1 deletion hibernate-platform/hibernate-platform.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plugins {

description = 'Gradle platform for Hibernate ORM'

apply from: rootProject.file( 'gradle/releasable.gradle' )
apply from: rootProject.file( "gradle/base-information.gradle" )
apply from: rootProject.file( "gradle/publishing-pom.gradle" )

Expand Down
4 changes: 2 additions & 2 deletions release/jenkins-release-process.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ First, a list of resources you will need access to in order to perform a release

== Steps

1. Perform `./gradlew preVerifyRelease` locally (after pulling all upstream changes). The Jenkins job does only the release steps, and we need to make sure tests and checkstyle especially are ok
1. Perform `./gradlew releasePrepare` locally (after pulling all upstream changes). The Jenkins job does only the release steps, and we need to make sure tests and checkstyle especially are ok
2. Mark the version as released in Jira
3. Close all issues associated with the version as closed. Be sure to remove the version from any issues that are not resolved (e.g. rejected) - the Jira "release notes" mechanism includes all issues with that version as the fix-for regardless of the resolution
4. Start the https://ci.hibernate.org/view/ORM/job/hibernate-orm-release/[Jenkins job]. It is a parameterized build - Jenkins will prompt user for needed information:
Expand All @@ -34,4 +34,4 @@ The Jenkins job performs the following tasks:

== Post-release steps

See <<./post-release-steps.adoc>>
See <<./post-release-steps.adoc>>
Loading
Loading