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 14651ba547..f8e9a6d2e1 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 a1c5d5f0a4..68e26ffa9f 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,6 @@ 3.3.2 - 1.7.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 @@ -175,16 +174,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} + @@ -199,39 +198,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 @@ -262,30 +228,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 @@ -316,44 +261,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 267d50dd18..0000000000 --- a/reports/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - 4.0.0 - - org.hibernate - hibernate-tools-parent - 5.3.38-SNAPSHOT - - hibernate-tools-reports - - Hibernate Tools Reports - Hibernate Tools build reports - pom - - - - org.hibernate - hibernate-tools - ${project.version} - - - org.hibernate - hibernate-tools-maven-plugin - ${project.version} - - - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - false - - - - - default-deploy - none - - - - deferred-deploy - deploy - - deploy-staged - - - - - - -