wip: ci: use fedoraBuild
Some checks reported errors
RPMs/gasket-driver/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
2025-11-23 11:42:55 -06:00
parent 2684e4b814
commit e3a56e43fc

82
ci/Jenkinsfile vendored
View File

@@ -1,7 +1,7 @@
pipeline { @Library('dch@fedora')_
agent none
triggers { properties([
pipelineTriggers([
GenericTrigger( GenericTrigger(
causeString: 'Webhook Trigger', causeString: 'Webhook Trigger',
genericVariables: [[ genericVariables: [[
@@ -15,56 +15,38 @@ pipeline {
silentResponse: true, silentResponse: true,
tokenCredentialId: 'webhook-trigger', tokenCredentialId: 'webhook-trigger',
) )
} ])
])
stages { try {
stage('RPM') { fedoraBuild(
matrix { architectures: ['amd64'],
axes { podTemplate: 'ci/podTemplate.yaml',
axis { ) { arch, fedoraVersion ->
name 'FEDORA' stage("Prepare f${fedoraVersion}/${arch}") {
values '41', '42' checkout scm
}
}
agent { container('build') {
kubernetes {
yamlFile 'ci/podTemplate.yaml'
yamlMergeStrategy merge()
defaultContainer 'fedora'
containerTemplate {
name 'fedora'
image "registry.fedoraproject.org/fedora:${FEDORA}"
}
}
}
stages {
stage('Prepare') {
steps {
sh '. ci/prepare.sh' sh '. ci/prepare.sh'
} }
} }
stage('Build') { stage("Build f${fedoraVersion}/${arch}") {
steps {
withCredentials([file( withCredentials([file(
credentialsId: 'kmod-signing-cert', credentialsId: 'kmod-signing-cert',
variable: 'SIGNING_KEY', variable: 'SIGNING_KEY',
)]) { )]) {
container('build') {
sh '. ci/build.sh' sh '. ci/build.sh'
} }
} }
} }
stage('Sign') { stage("Sign f${fedoraVersion}/${arch}") {
when { when(BRANCH_NAME == 'main') {
branch 'main' withEnvironment([
} "GNUPGHOME=${env.WORKSPACE_TMP}/gnupg",
environment { ]) {
GNUPGHOME = "${env.WORKSPACE_TMP}/gnupg"
}
steps {
withCredentials([ withCredentials([
file( file(
credentialsId: 'rpm-gpg-key', credentialsId: 'rpm-gpg-key',
@@ -79,36 +61,26 @@ pipeline {
} }
} }
} }
}
stage('Archive') {
steps {
archiveArtifacts '*.rpm' archiveArtifacts '*.rpm'
}
}
stage('Publish') { stage("Publish f${fedoraVersion}/${arch}") {
when { when(BRANCH_NAME == 'main') {
branch 'main' container('build') {
}
steps {
sshagent(['jenkins-repohost']) { sshagent(['jenkins-repohost']) {
sh '. ci/publish.sh' sh '. ci/publish.sh'
} }
} }
} }
} }
} }
} } catch (ex) {
} currentBuild.result = 'FAILED'
post {
failure {
emailext( emailext(
to: 'gyrfalcon@ebonfire.com', to: 'gyrfalcon@ebonfire.com',
subject: '$DEFAULT_SUBJECT', subject: '$DEFAULT_SUBJECT',
body: '$DEFAULT_CONTENT', body: '$DEFAULT_CONTENT',
) )
} throw ex
}
} }