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