You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by js...@apache.org on 2024/05/24 09:27:42 UTC
(incubator-kie-kogito-apps) branch main updated: [NO-ISSUE] Use apache-release profile when doing a release build (#2062)
This is an automated email from the ASF dual-hosted git repository.
jstastnycz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-apps.git
The following commit(s) were added to refs/heads/main by this push:
new d93023f19 [NO-ISSUE] Use apache-release profile when doing a release build (#2062)
d93023f19 is described below
commit d93023f19b2013d75b6fc66e1115bab06ec60f52
Author: Tibor Zimányi <ti...@ibm.com>
AuthorDate: Fri May 24 11:27:38 2024 +0200
[NO-ISSUE] Use apache-release profile when doing a release build (#2062)
* Add apache-release profile to release builds.
* Add password to gpg signing setup.
* Revert accidental changes.
* Fix Maven settings use.
* Add GPG password to Maven command.
* Run from withCredentials block for release.
---
.ci/jenkins/Jenkinsfile.deploy | 35 ++++++++++++++++++++++++++++-------
1 file changed, 28 insertions(+), 7 deletions(-)
diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy
index c607a4c50..dce243d71 100644
--- a/.ci/jenkins/Jenkinsfile.deploy
+++ b/.ci/jenkins/Jenkinsfile.deploy
@@ -110,14 +110,35 @@ pipeline {
} else {
installOrDeploy = 'install'
}
- configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
- getMavenCommand().withProperty('maven.test.failure.ignore', true)
- .withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : [])
- .withOptions(env.KOGITO_APPS_BUILD_MVN_OPTS ? [ env.KOGITO_APPS_BUILD_MVN_OPTS ] : [])
- .skipTests(skipTests)
- .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
- .run("clean $installOrDeploy")
+
+ def mavenCommand = getMavenCommand().withProperty('maven.test.failure.ignore', true)
+ .withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : [])
+ .withOptions(env.KOGITO_APPS_BUILD_MVN_OPTS ? [ env.KOGITO_APPS_BUILD_MVN_OPTS ] : [])
+ .skipTests(skipTests)
+
+ 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')
+
+ mavenCommand.withProperty('gpg.passphrase', SIGNING_KEY_PASSWORD)
+ mavenCommand.withProfiles(['apache-release'])
+ configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) {
+ mavenCommand.withSettingsXmlFile(MAVEN_SETTINGS_FILE).run("clean $installOrDeploy")
+ }
+ }
+ }
+ } else {
+ configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+ mavenCommand.withSettingsXmlFile(MAVEN_SETTINGS_FILE).run("clean $installOrDeploy")
+ }
}
+
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org