From 0ace925ec12cfb65291262a012469e810886ba1d Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 23 Nov 2025 12:55:40 -0600 Subject: [PATCH] fixup! wip: ci: use fedoraBuild --- ci/Jenkinsfile | 63 +++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 1808d77..9758079 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -18,8 +18,8 @@ properties([ ]) ]) -fedoraBuild(architectures: ['amd64']) { - try { +try { + fedoraBuild(architectures: ['amd64']) { stage('Prepare') { checkout scm @@ -40,45 +40,44 @@ fedoraBuild(architectures: ['amd64']) { } stage('Sign') { - when { - branch 'main' - } - withEnvironment([ - "GNUPGHOME=${env.WORKSPACE_TMP}/gnupg", - ]) { - withCredentials([ - file( - credentialsId: 'rpm-gpg-key', - variable: 'RPM_GPG_PRIVATE_KEY', - ), - file( - credentialsId: 'rpm-gpg-key-passphrase', - variable: 'RPM_GPG_KEY_PASSPHRASE', - ), + when(BRANCH_NAME == 'main') { + withEnvironment([ + "GNUPGHOME=${env.WORKSPACE_TMP}/gnupg", ]) { - sh '. ci/sign.sh' + withCredentials([ + file( + credentialsId: 'rpm-gpg-key', + variable: 'RPM_GPG_PRIVATE_KEY', + ), + file( + credentialsId: 'rpm-gpg-key-passphrase', + variable: 'RPM_GPG_KEY_PASSPHRASE', + ), + ]) { + sh '. ci/sign.sh' + } } } - } + } archiveArtifacts '*.rpm' stage('Publish') { - when { - branch 'main' - } - container('build') { - sshagent(['jenkins-repohost']) { - sh '. ci/publish.sh' + when(BRANCH_NAME == 'main') { + container('build') { + sshagent(['jenkins-repohost']) { + sh '. ci/publish.sh' + } } } } - - } catch (ex) { - emailext( - to: 'gyrfalcon@ebonfire.com', - subject: '$DEFAULT_SUBJECT', - body: '$DEFAULT_CONTENT', - ) } +} catch (ex) { + currentBuild.result = 'FAILED' + emailext( + to: 'gyrfalcon@ebonfire.com', + subject: '$DEFAULT_SUBJECT', + body: '$DEFAULT_CONTENT', + ) + throw ex }