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
3 changes: 3 additions & 0 deletions .release/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The folder into which we checkout our release scripts into
*
!.gitignore
16 changes: 12 additions & 4 deletions ci/release/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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()}
"""
}
Expand Down
127 changes: 16 additions & 111 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,21 +104,20 @@

<!-- Plugins not managed by the JBoss parent POM: -->
<maven-wrapper-plugin.version>3.3.2</maven-wrapper-plugin.version>
<nexus-staging.plugin.version>1.7.0</nexus-staging.plugin.version>
<flatten-maven-plugin.version>1.7.0</flatten-maven-plugin.version>

<!--
We don't want to publish or sign any modules by default.
Specific modules will override the setting at their own level.
-->
<deploy.skip>true</deploy.skip>
<maven-deploy-plugin.skip>true</maven-deploy-plugin.skip>

<!-- Repository Deployment URLs -->
<ossrh.releases.repo.id>ossrh</ossrh.releases.repo.id>
<ossrh.releases.repo.name>Sonatype OSSRH Releases</ossrh.releases.repo.name>
<ossrh.releases.repo.url>https://oss.sonatype.org/service/local/staging/deploy/maven2</ossrh.releases.repo.url>
<ossrh.releases.repo.baseUrl>https://oss.sonatype.org</ossrh.releases.repo.baseUrl>

<!-- We always publish to a local directory, JReleaser is supposed to take care of publishing to Nexus: -->
<local.staging.releases.repo.id>staging-deploy</local.staging.releases.repo.id>
<local.staging.releases.repo.name>Local Staging Directory Releases Repository</local.staging.releases.repo.name>
<local.staging.releases.repo.url>file:${maven.multiModuleProjectDirectory}/target/staging-deploy/maven</local.staging.releases.repo.url>
<ossrh.snapshots.repo.id>ossrh</ossrh.snapshots.repo.id>
<ossrh.snapshots.repo.name>Sonatype OSSRH Snapshots</ossrh.snapshots.repo.name>
<ossrh.snapshots.repo.url>https://oss.sonatype.org/content/repositories/snapshots</ossrh.snapshots.repo.url>
Expand Down Expand Up @@ -247,16 +246,16 @@
</dependencyManagement>

<distributionManagement>
<repository>
<id>${ossrh.releases.repo.id}</id>
<name>${ossrh.releases.repo.name}</name>
<url>${ossrh.releases.repo.url}</url>
</repository>
<snapshotRepository>
<id>${ossrh.snapshots.repo.id}</id>
<name>${ossrh.snapshots.repo.name}</name>
<url>${ossrh.snapshots.repo.url}</url>
</snapshotRepository>
<repository>
<id>${local.staging.releases.repo.id}</id>
<name>${local.staging.releases.repo.name}</name>
<url>${local.staging.releases.repo.url}</url>
</repository>
<snapshotRepository>
<id>${ossrh.snapshots.repo.id}</id>
<name>${ossrh.snapshots.repo.name}</name>
<url>${ossrh.snapshots.repo.url}</url>
</snapshotRepository>
</distributionManagement>


Expand All @@ -272,39 +271,6 @@
<distributionType>bin</distributionType>
</configuration>
</plugin>
<!-- Published artifacts have to be signed: -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<skip>${deploy.skip}</skip>
<homedir>${env.RELEASE_GPG_HOMEDIR}</homedir>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging.plugin.version}</version>
<extensions>false</extensions><!-- This is essential: do not put true here -->
<configuration>
<skipNexusStagingDeployMojo>${deploy.skip}</skipNexusStagingDeployMojo>
<serverId>${ossrh.releases.repo.id}</serverId>
<!-- The following, by default, is only used for actual releases, not for snapshot deployments -->
<nexusUrl>${ossrh.releases.repo.baseUrl}</nexusUrl>
<!-- oss.sonatype.org has been very slow when closing repositories lately;
let's raise the timeout until we switch to s01.sonatype.org -->
<stagingProgressTimeoutMinutes>60</stagingProgressTimeoutMinutes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
Expand Down Expand Up @@ -335,30 +301,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>${maven-deploy-plugin.skip}</skip>
<skip>${deploy.skip}</skip>
</configuration>
</plugin>
<!--
Configure the nexus-staging-maven-plugin explicitly (without <extension>true</extension>)
in order to work around a problem in the "reports" module (see that module's POM for more info).
-->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<!--
This will only put artifacts in a staging directory.
See the "reports" module for actual deployment, at the end of the build.
-->
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
Expand Down Expand Up @@ -389,44 +334,4 @@
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>

<!--
WARNING: this MUST be the very last profile,
so that the "report" module is the very last module,
in particular when deploying artifacts to a Nexus repository.
See the "build/reports" module POM for more information.
-->
<profile>
<id>build-reports-as-last-module</id>
<activation>
<property>
<name>!some.property.that.will.never.exist</name>
</property>
</activation>
<modules>
<module>reports</module>
</modules>
</profile>

<!-- DO NOT ADD ANY PROFILE AFTER THIS: see above -->
</profiles>

</project>
95 changes: 0 additions & 95 deletions reports/pom.xml

This file was deleted.