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/build/enforcer/pom.xml b/build/enforcer/pom.xml index 3a8ad2929a..51f051b11b 100644 --- a/build/enforcer/pom.xml +++ b/build/enforcer/pom.xml @@ -45,12 +45,6 @@ - - maven-gpg-plugin - - true - - org.apache.maven.plugins maven-enforcer-plugin diff --git a/build/reports/pom.xml b/build/reports/pom.xml index 96b638dae4..ee02f923bc 100644 --- a/build/reports/pom.xml +++ b/build/reports/pom.xml @@ -118,42 +118,6 @@ - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - false - - - - - default-deploy - none - - - - deferred-deploy - deploy - - deploy-staged - - - - - - coverage-report diff --git a/distribution/pom.xml b/distribution/pom.xml index 82b4562882..69b6134077 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -19,9 +19,6 @@ Builds the distribution bundles - - true - true - true - true -Duser.language=en -Duser.country=US forbidden-allow-junit.txt diff --git a/jenkins/release/Jenkinsfile b/jenkins/release/Jenkinsfile index c0e7d5e59c..0af27ba9d0 100644 --- a/jenkins/release/Jenkinsfile +++ b/jenkins/release/Jenkinsfile @@ -60,6 +60,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', @@ -68,13 +69,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' : ''} \ validator ${releaseVersion.toString()} ${developmentVersion.toString()} """ } diff --git a/jenkins/snapshot-publish/Jenkinsfile b/jenkins/snapshot-publish/Jenkinsfile index cc58dda587..6bf1890b65 100644 --- a/jenkins/snapshot-publish/Jenkinsfile +++ b/jenkins/snapshot-publish/Jenkinsfile @@ -33,13 +33,16 @@ pipeline { stage('Publish') { steps { script { - withMaven(mavenSettingsConfig: 'ci-hibernate.deploy.settings.maven', - mavenLocalRepo: env.WORKSPACE_TMP + '/.m2repository') { - sh """mvn \ - -Pci-build \ - -DskipTests \ - clean deploy \ - """ + withMaven(mavenSettingsConfig: 'ci-hibernate.deploy.settings.maven', mavenLocalRepo: env.WORKSPACE_TMP + '/.m2repository') { + dir('.release/scripts') { + sh 'git clone https://github.com/hibernate/hibernate-release-scripts.git .' + } + def version = sh( + script: ".release/scripts/determine-current-version.sh validator", + returnStdout: true + ).trim() + echo "Current version: '${version}'" + sh "bash -xe .release/scripts/snapshot-deploy.sh validator ${version}" } } } diff --git a/parents/public/pom.xml b/parents/public/pom.xml index db55e4c203..08c0e63bc8 100644 --- a/parents/public/pom.xml +++ b/parents/public/pom.xml @@ -57,10 +57,6 @@ org.apache.maven.plugins maven-source-plugin - - org.apache.maven.plugins - maven-gpg-plugin - diff --git a/pom.xml b/pom.xml index e26bcda91a..9a1a7575bb 100644 --- a/pom.xml +++ b/pom.xml @@ -246,7 +246,6 @@ 3.9 4.2.0 - 3.2.7 3.1.4 0.23.1 3.4.2 @@ -260,7 +259,6 @@ 3.5.3 9.8 ${version.surefire.plugin} - 1.7.0 1.7.0 1.2.2.Final 0.9.0.M3 @@ -276,9 +274,9 @@ - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - https://oss.sonatype.org/ + + staging-deploy + file:${maven.multiModuleProjectDirectory}/target/staging-deploy/maven ossrh https://oss.sonatype.org/content/repositories/snapshots @@ -745,36 +743,6 @@ - - - org.sonatype.plugins - nexus-staging-maven-plugin - false - - ${ossrh.releases.repo.id} - - ${ossrh.releases.repo.baseUrl} - - 60 - - - - default-deploy - deploy - - - deploy - - - - @@ -1199,13 +1167,9 @@ ${version.deploy.plugin} - ${maven-deploy-plugin.skip} + ${deploy.skip} - - maven-gpg-plugin - ${version.gpg.plugin} - maven-resources-plugin ${version.resources.plugin} @@ -1563,14 +1527,6 @@ versions-maven-plugin ${version.versions.plugin} - - org.sonatype.plugins - nexus-staging-maven-plugin - ${version.nexus-staging-maven-plugin} - - ${deploy.skip} - - org.apache.maven.plugins maven-wrapper-plugin @@ -1639,9 +1595,9 @@ - ${ossrh.releases.repo.id} - OSSRH Releases Repository - ${ossrh.releases.repo.url} + ${local.staging.releases.repo.id} + Local Staging Directory Releases Repository + ${local.staging.releases.repo.url} ${ossrh.snapshots.repo.id} @@ -1700,23 +1656,6 @@ - - org.apache.maven.plugins - maven-gpg-plugin - - - sign-artifacts - verify - - sign - - - ${env.RELEASE_GPG_HOMEDIR} - true - - - -