ci: Add Jenkins build/publish pipeline
All checks were successful
infra/dch-selinux/pipeline/head This commit looks good
All checks were successful
infra/dch-selinux/pipeline/head This commit looks good
This commit is contained in:
40
ci/Jenkinsfile
vendored
Normal file
40
ci/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
// vim: set sw=4 ts=4 sts=4 et :
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
kubernetes {
|
||||||
|
yamlFile 'ci/podTemplate.yaml'
|
||||||
|
defaultContainer 'build'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh 'make rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Publish') {
|
||||||
|
when {
|
||||||
|
branch 'main'
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
withCredentials([usernamePassword(
|
||||||
|
credentialsId: 'jenkins-packages',
|
||||||
|
usernameVariable: 'GITEA_USERNAME',
|
||||||
|
passwordVariable: 'GITEA_PASSWORD',
|
||||||
|
)]) {
|
||||||
|
sh 'make publish'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
success {
|
||||||
|
archiveArtifacts '*.rpm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
7
ci/podTemplate.yaml
Normal file
7
ci/podTemplate.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: build
|
||||||
|
image: git.pyrocufflink.net/containerimages/build/selinux:main
|
||||||
|
imagePullPolicy: Always
|
||||||
|
securityPolicy:
|
||||||
|
runAsNonRoot: true
|
||||||
Reference in New Issue
Block a user