diff --git a/.release/.gitignore b/.release/.gitignore new file mode 100644 index 0000000000..cdd9a17d6b --- /dev/null +++ b/.release/.gitignore @@ -0,0 +1,3 @@ +# The folder into which we checkout our release scripts into +* +!.gitignore \ No newline at end of file diff --git a/ci/release/Jenkinsfile b/ci/release/Jenkinsfile index c23af2ad13..8adda8067d 100644 --- a/ci/release/Jenkinsfile +++ b/ci/release/Jenkinsfile @@ -74,6 +74,7 @@ pipeline { def releaseVersion = Version.parseReleaseVersion(params.RELEASE_VERSION) def developmentVersion = Version.parseDevelopmentVersion(params.DEVELOPMENT_VERSION) + env.JRELEASER_DRY_RUN = params.RELEASE_DRY_RUN echo "Performing full release for version ${releaseVersion.toString()}" withMaven(mavenSettingsConfig: params.RELEASE_DRY_RUN ? null : 'ci-hibernate.deploy.settings.maven', @@ -82,13 +83,20 @@ pipeline { configFile(fileId: 'release.config.ssh.knownhosts', targetLocation: env.HOME + '/.ssh/known_hosts')]) { // using MAVEN_GPG_PASSPHRASE (the default env variable name for passphrase in maven gpg plugin) withCredentials([file(credentialsId: 'release.gpg.private-key', variable: 'RELEASE_GPG_PRIVATE_KEY_PATH'), - string(credentialsId: 'release.gpg.passphrase', variable: 'MAVEN_GPG_PASSPHRASE')]) { + string(credentialsId: 'release.gpg.passphrase', variable: 'JRELEASER_GPG_PASSPHRASE'), + // TODO: Once we switch to maven-central publishing (from nexus2) we need to add a new credentials + // to use the following env variable names to set the user/password: + // JRELEASER_MAVENCENTRAL_USERNAME + // JRELEASER_MAVENCENTRAL_TOKEN + usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'JRELEASER_NEXUS2_PASSWORD', usernameVariable: 'JRELEASER_NEXUS2_USERNAME'), + 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']) { sh 'cat $HOME/.ssh/config' - sh 'git clone https://github.com/hibernate/hibernate-release-scripts.git' - env.RELEASE_GPG_HOMEDIR = env.WORKSPACE_TMP + '/.gpg' + dir('.release/scripts') { + sh 'git clone https://github.com/hibernate/hibernate-release-scripts.git .' + } sh """ - bash -xe hibernate-release-scripts/release.sh ${params.RELEASE_DRY_RUN ? '-d' : ''} \ + bash -xe .release/scripts/release.sh -j ${params.RELEASE_DRY_RUN ? '-d' : ''} \ tools ${releaseVersion.toString()} ${developmentVersion.toString()} """ } diff --git a/pom.xml b/pom.xml index 38271a83f6..6f34fe5fc2 100644 --- a/pom.xml +++ b/pom.xml @@ -103,21 +103,20 @@ 3.3.2 - 1.7.0 - 1.5.0 + 1.7.0 true - true - ossrh - Sonatype OSSRH Releases - https://oss.sonatype.org/service/local/staging/deploy/maven2 - https://oss.sonatype.org + + + staging-deploy + Local Staging Directory Releases Repository + file:${maven.multiModuleProjectDirectory}/target/staging-deploy/maven ossrh Sonatype OSSRH Snapshots https://oss.sonatype.org/content/repositories/snapshots @@ -246,16 +245,16 @@ - - ${ossrh.releases.repo.id} - ${ossrh.releases.repo.name} - ${ossrh.releases.repo.url} - - - ${ossrh.snapshots.repo.id} - ${ossrh.snapshots.repo.name} - ${ossrh.snapshots.repo.url} - + + ${local.staging.releases.repo.id} + ${local.staging.releases.repo.name} + ${local.staging.releases.repo.url} + + + ${ossrh.snapshots.repo.id} + ${ossrh.snapshots.repo.name} + ${ossrh.snapshots.repo.url} + @@ -270,39 +269,6 @@ bin - - - org.apache.maven.plugins - maven-gpg-plugin - - - sign-artifacts - verify - - sign - - - ${deploy.skip} - ${env.RELEASE_GPG_HOMEDIR} - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - ${nexus-staging.plugin.version} - false - - ${deploy.skip} - ${ossrh.releases.repo.id} - - ${ossrh.releases.repo.baseUrl} - - 60 - - org.codehaus.mojo flatten-maven-plugin @@ -333,30 +299,9 @@ org.apache.maven.plugins maven-deploy-plugin - ${maven-deploy-plugin.skip} + ${deploy.skip} - - - org.sonatype.plugins - nexus-staging-maven-plugin - - - default-deploy - deploy - - - deploy - - - - org.codehaus.mojo flatten-maven-plugin @@ -387,44 +332,4 @@ - - - release - - - performRelease - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - - - - - - - - build-reports-as-last-module - - - !some.property.that.will.never.exist - - - - reports - - - - - - diff --git a/reports/pom.xml b/reports/pom.xml deleted file mode 100644 index 00c9a871ee..0000000000 --- a/reports/pom.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - 4.0.0 - - org.hibernate.tool - hibernate-tools-parent - 6.4.11-SNAPSHOT - - hibernate-tools-reports - - Hibernate Tools Reports - Hibernate Tools build reports - pom - - - - org.hibernate.tool - hibernate-tools-utils - ${project.version} - - - org.hibernate.tool - hibernate-tools-orm - ${project.version} - - - org.hibernate.tool - hibernate-tools-orm-jbt - ${project.version} - - - org.hibernate.tool - hibernate-tools-maven - ${project.version} - - - org.hibernate.tool - hibernate-tools-gradle - ${project.version} - - - org.hibernate.tool - hibernate-tools-ant - ${project.version} - - - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - false - - - - - default-deploy - none - - - - deferred-deploy - deploy - - deploy-staged - - - - - - -