Skip to content

Commit

Permalink
Fix release sources zip jenkins job (#1248)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigonull committed Sep 17, 2024
1 parent 47c20ac commit 3965397
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
26 changes: 14 additions & 12 deletions .ci/jenkins/Jenkinsfile.zip.sources
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ pipeline {

environment {
SOURCES_FILE_NAME = "${SOURCES_FILE_NAME_TEMPLATE}.zip"
SIGNATURE_FILE_NAME = "${SOURCES_FILE_NAME_TEMPLATE}.asc"
SIGNATURE_FILE_NAME = "${SOURCES_FILE_NAME_TEMPLATE}.zip.asc"
CHECKSUM_FILE_NAME = "${SOURCES_FILE_NAME_TEMPLATE}.zip.sha512"
}

options {
Expand All @@ -23,20 +24,21 @@ pipeline {
archiveArtifacts artifacts: "**/${SOURCES_FILE_NAME}"
}
}
stage('Sign and upload the sources.zip') {
steps {
script {
releaseUtils.gpgImportKeyFromStringWithoutPassword(getReleaseGpgSignKeyCredsId())
releaseUtils.gpgSignFileDetachedSignatureWithoutPassword(SOURCES_FILE_NAME, SIGNATURE_FILE_NAME)
releaseUtils.svnUploadFileToRepository(getReleaseSvnRepository(), getReleaseSvnCredsId(), TARGET_VERSION, SOURCES_FILE_NAME, SIGNATURE_FILE_NAME)
}
archiveArtifacts artifacts: "**/${SIGNATURE_FILE_NAME}"
}
}
stage('Sign and upload the sources.zip') {
steps {
dir('sources-out') {
script {
releaseUtils.gpgImportKeyFromStringWithoutPassword(getReleaseGpgSignKeyCredsId())
releaseUtils.gpgSignFileDetachedSignatureWithoutPassword(SOURCES_FILE_NAME, SIGNATURE_FILE_NAME)
releaseUtils.svnUploadFileToRepository(getReleaseSvnRepository(), getReleaseSvnCredsId(), TARGET_VERSION, SOURCES_FILE_NAME, SIGNATURE_FILE_NAME, CHECKSUM_FILE_NAME)
}
archiveArtifacts artifacts: "**/${SIGNATURE_FILE_NAME}"
}
}
}
}
}


String getReleaseGpgSignKeyCredsId() {
return env.RELEASE_GPG_SIGN_KEY_CREDS_ID
}
Expand Down
4 changes: 2 additions & 2 deletions .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ void setupZipSourcesJob() {

RELEASE_GPG_SIGN_KEY_CREDS_ID: Utils.getReleaseGpgSignKeyCredentialsId(this),
RELEASE_GPG_SIGN_PASSPHRASE_CREDS_ID: Utils.getReleaseGpgSignPassphraseCredentialsId(this),
RELEASE_SVN_REPOSITORY: Utils.getReleaseSvnCredentialsId(this),
RELEASE_SVN_CREDS_ID: Utils.getReleaseSvnStagingRepository(this)
RELEASE_SVN_REPOSITORY: Utils.getReleaseSvnStagingRepository(this),
RELEASE_SVN_CREDS_ID: Utils.getReleaseSvnCredentialsId(this)
])

KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
Expand Down

0 comments on commit 3965397

Please sign in to comment.