Skip to content

Commit

Permalink
[10.0.x] NO-ISSUE: Fix SVN upload utility function (#1246)
Browse files Browse the repository at this point in the history
* Fix SVN upload utility function

* Add shasum func
  • Loading branch information
rodrigonull committed Sep 3, 2024
1 parent 8bcab2b commit dc98f03
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ def gpgSignFileDetachedSignatureWithPassword(String file, String signatureTarget
}

def gpgSignFileDetachedSignatureWithoutPassword(String file, String signatureTarget) {
sh "gpg --batch --sign --pinentry-mode=loopback --output ${signatureTarget} --detach-sig ${file}"
sh """
gpg --batch --sign --pinentry-mode=loopback --output ${signatureTarget} --detach-sig ${file}
shasum -a 512 ${file} > ${file}.sha512
"""
}

boolean gpgIsValidDetachedSignature(String file, String signature) {
Expand All @@ -38,13 +41,13 @@ boolean gpgIsValidDetachedSignature(String file, String signature) {

def svnUploadFileToRepository(String svnRepository, String svnCredentialsId, String releaseVersion, String... files) {
withCredentials([usernamePassword(credentialsId: svnCredentialsId, usernameVariable: 'ASF_USERNAME', passwordVariable: 'ASF_PASSWORD')]) {
sh "svn co --depth=empty ${svnRepository} svn-kie"
sh "svn co --depth=empty ${svnRepository}/${releaseVersion} svn-kie"
for (file in files) {
sh "cp ${file} svn-kie/${releaseVersion}/"
sh "cp ${file} svn-kie"
}
sh """
svn add "svn-kie/${releaseVersion}"
cd svn-kie
svn add . --force
svn ci --non-interactive --no-auth-cache --username ${ASF_USERNAME} --password '${ASF_PASSWORD}' -m "Apache KIE ${releaseVersion} artifacts"
rm -rf svn-kie
"""
Expand Down

0 comments on commit dc98f03

Please sign in to comment.