Skip to content

Commit

Permalink
[NO-ISSUE] Use apache-release profile when doing a release build (#3530)
Browse files Browse the repository at this point in the history
* Add apache-release profile to release builds.

* Override javadoc version.

* Fix JavaDoc build.

* Add password to gpg signing setup.

* Add GPG password to signing command

* Run from within withCredentials block for release.
  • Loading branch information
baldimir authored May 24, 2024
1 parent 7f04f1f commit a4e5345
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
29 changes: 25 additions & 4 deletions .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,32 @@ pipeline {
if (params.SKIP_TESTS) {
mvnCmd.skipTests() // Conflict somehow with Python testing. If `skipTests={anyvalue}` is set, then exec plugin is not executed ...
}
configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
mvnCmd
.withSettingsXmlFile(MAVEN_SETTINGS_FILE)
.run("clean $installOrDeploy")
if (isRelease()) {
withCredentials([file(credentialsId: 'asf-release-gpg-signing-key', variable: 'SIGNING_KEY')]) {
withCredentials([file(credentialsId: 'asf-release-gpg-signing-key-password', variable: 'SIGNING_KEY_PASSWORD')]) {
// copy the key to singkey.gpg file in *plain text* so we can import it
sh ('cat $SIGNING_KEY > $WORKSPACE/signkey.gpg')
// Please do not remove list keys command. When gpg is run for the first time, it may initialize some internals.
sh ('gpg --list-keys')
sh ("gpg --batch --pinentry-mode=loopback --passphrase \"${SIGNING_KEY_PASSWORD}\" --import signkey.gpg")
sh ('rm $WORKSPACE/signkey.gpg')

mvnCmd.withProperty('gpg.passphrase', SIGNING_KEY_PASSWORD)
.withProfiles(['apache-release'])

configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
mvnCmd.withSettingsXmlFile(MAVEN_SETTINGS_FILE)
.run("clean $installOrDeploy")
}
}
}
} else {
configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
mvnCmd.withSettingsXmlFile(MAVEN_SETTINGS_FILE)
.run("clean $installOrDeploy")
}
}

}
}
}
Expand Down
10 changes: 10 additions & 0 deletions kogito-build/kogito-build-no-bom-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,16 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${version.maven-javadoc-plugin}</version>
<configuration>
<quiet>true</quiet>
<doclint>none</doclint>
<legacyMode>true</legacyMode>
</configuration>
</plugin>
</plugins>
</pluginManagement>

Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<project.build.outputTimestamp>2024-01-16T00:00:00Z</project.build.outputTimestamp>
<version.maven.artifact.plugin>3.4.1</version.maven.artifact.plugin>
<version.apache-rat-plugin>0.16.1</version.apache-rat-plugin>
<version.maven-javadoc-plugin>3.6.2</version.maven-javadoc-plugin>
</properties>

<build>
Expand Down

0 comments on commit a4e5345

Please sign in to comment.