Skip to content
Draft
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
38 changes: 18 additions & 20 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', '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,31 +262,21 @@ 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' ) {
checkout scmGit(
branches: [[name: '*/production']],
extensions: [],
userRemoteConfigs: [[credentialsId: 'ed25519.Hibernate-CI.github.com', url: 'https://github.com/hibernate/hibernate.org.git']]
)
sh "../scripts/website-release.sh ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION}"
checkout scmGit(
branches: [[name: '*/production']],
extensions: [],
userRemoteConfigs: [[credentialsId: 'ed25519.Hibernate-CI.github.com', url: 'https://github.com/hibernate/hibernate.org.git']]
)
sh "../scripts/website-release.sh ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION}"
}
}
}
}
}
}
}
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
8 changes: 8 additions & 0 deletions documentation/documentation.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -840,4 +840,12 @@ tasks.withType(AsciidoctorTask).configureEach {
separateOutputDirs = false
backends 'html5'
}
// See https://docs.asciidoctor.org/gradle-plugin/latest/common-task-configuration/#choosing-an-execution-mode-for-asciidoctorj
executionMode = org.ysb33r.grolifant.api.core.jvm.ExecutionMode.JAVA_EXEC
}

tasks.withType(AsciidoctorPdfTask).configureEach {
// See https://docs.asciidoctor.org/gradle-plugin/latest/common-task-configuration/#choosing-an-execution-mode-for-asciidoctorj
executionMode = org.ysb33r.grolifant.api.core.jvm.ExecutionMode.JAVA_EXEC
}

20 changes: 13 additions & 7 deletions gradle/published-java-module.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ apply from: rootProject.file( 'gradle/releasable.gradle' )
apply from: rootProject.file( 'gradle/java-module.gradle' )
apply from: rootProject.file( 'gradle/publishing-pom.gradle' )

// Make sure that the publishReleaseArtifacts task of the release module runs the release task of this sub module
tasks.getByPath( ':release:publishReleaseArtifacts' ).dependsOn tasks.release

configurations {
javadocSources {
description 'Used to aggregate javadocs for the whole project'
Expand Down Expand Up @@ -129,10 +126,19 @@ tasks.register('ciBuild') {

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
1 change: 1 addition & 0 deletions gradle/publishing-pom.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ publishing {
}

}

4 changes: 2 additions & 2 deletions gradle/releasable.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ task release {
enabled !project.ormVersion.isSnapshot
}

task preVerifyRelease {
dependsOn ':release:preVerifyRelease'
task prepareRelease {
dependsOn ':release:prepareRelease'
}
4 changes: 0 additions & 4 deletions local-build-plugins/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ gradlePlugin {
id = 'org.hibernate.orm.build.reports'
implementationClass = 'org.hibernate.orm.post.ReportGenerationPlugin'
}
docPubPlugin {
id = 'org.hibernate.orm.build.doc-pub'
implementationClass = 'org.hibernate.orm.docs.DocumentationPublishingPlugin'
}
envSettings {
id = 'org.hibernate.orm.build.env-settings'
implementationClass = 'org.hibernate.orm.env.EnvironmentSettingsPlugin'
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading