Some checks failed
RPMs/gasket-driver/pipeline/head There was a failure building this commit
83 lines
2.0 KiB
Groovy
83 lines
2.0 KiB
Groovy
@Library('dch@fedora')_
|
|
|
|
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',
|
|
)
|
|
])
|
|
])
|
|
|
|
fedoraBuild {
|
|
try {
|
|
stage('Prepare') {
|
|
container('build') {
|
|
sh '. ci/prepare.sh'
|
|
}
|
|
}
|
|
|
|
stage('Build') {
|
|
withCredentials([file(
|
|
credentialsId: 'kmod-signing-cert',
|
|
variable: 'SIGNING_KEY',
|
|
)]) {
|
|
container('build') {
|
|
sh '. ci/build.sh'
|
|
}
|
|
}
|
|
}
|
|
|
|
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',
|
|
),
|
|
]) {
|
|
sh '. ci/sign.sh'
|
|
}
|
|
}
|
|
}
|
|
|
|
archiveArtifacts '*.rpm'
|
|
|
|
stage('Publish') {
|
|
when {
|
|
branch 'main'
|
|
}
|
|
container('build') {
|
|
sshagent(['jenkins-repohost']) {
|
|
sh '. ci/publish.sh'
|
|
}
|
|
}
|
|
}
|
|
|
|
} catch (ex) {
|
|
emailext(
|
|
to: 'gyrfalcon@ebonfire.com',
|
|
subject: '$DEFAULT_SUBJECT',
|
|
body: '$DEFAULT_CONTENT',
|
|
)
|
|
}
|
|
}
|