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
37 changes: 9 additions & 28 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -697,34 +697,15 @@ stage('Deploy') {
runBuildOnNode {
withMavenWorkspace(mavenSettingsConfig: params.RELEASE_DRY_RUN ? null : helper.configuration.file.deployment.maven.settingsId) {
configFileProvider([configFile(fileId: 'release.config.ssh', targetLocation: env.HOME + '/.ssh/config')]) {
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-noorm-release-scripts.git"
sh "bash -xe hibernate-noorm-release-scripts/prepare-release.sh search ${releaseVersion.toString()}"

String deployCommand = "bash -xe hibernate-noorm-release-scripts/deploy.sh search"
if (!params.RELEASE_DRY_RUN) {
sh deployCommand
} else {
echo "WARNING: Not deploying. Would have executed:"
echo deployCommand
}

String uploadDistributionCommand = "bash -xe hibernate-noorm-release-scripts/upload-distribution.sh search ${releaseVersion.toString()}"
String uploadDocumentationCommand = "bash -xe hibernate-noorm-release-scripts/upload-documentation.sh search ${releaseVersion.toString()} ${releaseVersion.family}"
if (!params.RELEASE_DRY_RUN) {
sh uploadDistributionCommand
sh uploadDocumentationCommand
}
else {
echo "WARNING: Not uploading anything. Would have executed:"
echo uploadDistributionCommand
echo uploadDocumentationCommand
}

sh "bash -xe hibernate-noorm-release-scripts/update-version.sh search ${afterReleaseDevelopmentVersion.toString()}"
sh "bash -xe hibernate-noorm-release-scripts/push-upstream.sh search ${releaseVersion.toString()} ${helper.scmSource.branch.name} ${!params.RELEASE_DRY_RUN}"
}
withCredentials([file(credentialsId: 'release.gpg.private-key', variable: 'RELEASE_GPG_PRIVATE_KEY_PATH'),
string(credentialsId: 'release.gpg.passphrase', variable: 'RELEASE_GPG_PASSPHRASE')]) {
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-noorm-release-scripts.git"
env.RELEASE_GPG_HOMEDIR = env.WORKSPACE_TMP + '/.gpg'
sh "bash -xe hibernate-noorm-release-scripts/release.sh search ${releaseVersion.toString()} ${afterReleaseDevelopmentVersion.toString()}"
}
}
}
}
}
Expand Down
30 changes: 30 additions & 0 deletions parents/public/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -245,5 +245,35 @@
</plugins>
</build>
</profile>
<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>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<homedir>${env.RELEASE_GPG_HOMEDIR}</homedir>
<passphrase>${env.RELEASE_GPG_PASSPHRASE}</passphrase>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@
<version.moditect.plugin>1.0.0.Beta2</version.moditect.plugin>
<version.sonar.plugin>3.7.0.1746</version.sonar.plugin>
<version.scripting.plugin>3.0.0</version.scripting.plugin>
<version.gpg.plugin>3.0.1</version.gpg.plugin>
<version.org.codehaus.groovy-jsr223>3.0.8</version.org.codehaus.groovy-jsr223>
<!--
Please don't change the name of this property, it may be used and
Expand Down Expand Up @@ -1922,6 +1923,11 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${version.gpg.plugin}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down