diff --git a/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy b/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy index af51530b0..bab1596be 100644 --- a/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy +++ b/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy @@ -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) { @@ -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 """