All checks were successful
RPMs/gasket-driver/pipeline/head This commit looks good
That's the problem with having conditional stages that don't execute for test builds...
90 lines
2.5 KiB
Groovy
90 lines
2.5 KiB
Groovy
@Library('dch')_
|
|
|
|
properties([
|
|
pipelineTriggers([
|
|
GenericTrigger(
|
|
causeString: 'Webhook Trigger',
|
|
genericVariables: [[
|
|
key: 'nvr',
|
|
value: '$[*].builds[*].nvr',
|
|
]],
|
|
printContributedVariables: true,
|
|
printPostContent: true,
|
|
regexpFilterExpression: 'kernel-.*',
|
|
regexpFilterText: '$nvr',
|
|
silentResponse: true,
|
|
tokenCredentialId: 'webhook-trigger',
|
|
)
|
|
])
|
|
])
|
|
|
|
try {
|
|
fedoraBuild(
|
|
architectures: ['amd64'],
|
|
podTemplate: 'ci/podTemplate.yaml',
|
|
buildContainer: 'fedora',
|
|
) { arch, fedoraVersion ->
|
|
stage("Prepare f${fedoraVersion}/${arch}") {
|
|
checkout scm
|
|
|
|
container('fedora') {
|
|
sh '. ci/prepare.sh'
|
|
}
|
|
}
|
|
|
|
stage("Build f${fedoraVersion}/${arch}") {
|
|
withCredentials([file(
|
|
credentialsId: 'kmod-signing-cert',
|
|
variable: 'SIGNING_KEY',
|
|
)]) {
|
|
container('fedora') {
|
|
sh '. ci/build.sh'
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Sign f${fedoraVersion}/${arch}") {
|
|
when(BRANCH_NAME == 'main') {
|
|
withEnv([
|
|
"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',
|
|
),
|
|
]) {
|
|
container('fedora') {
|
|
sh '. ci/sign.sh'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
archiveArtifacts '*.rpm'
|
|
|
|
stage("Publish f${fedoraVersion}/${arch}") {
|
|
when(BRANCH_NAME == 'main') {
|
|
container('fedora') {
|
|
sshagent(['jenkins-repohost']) {
|
|
sh '. ci/publish.sh'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} catch (ex) {
|
|
currentBuild.result = 'FAILED'
|
|
emailext(
|
|
to: 'gyrfalcon@ebonfire.com',
|
|
subject: '$DEFAULT_SUBJECT',
|
|
body: '$DEFAULT_CONTENT',
|
|
)
|
|
throw ex
|
|
}
|