1
0
Fork 0

ci: Add Jenkins build/publish pipeline
infra/dch-selinux/pipeline/head This commit looks good Details

main
Dustin 2022-12-19 11:07:30 -06:00
parent 8c1eaf1bac
commit ed07fe930e
2 changed files with 47 additions and 0 deletions

40
ci/Jenkinsfile vendored Normal file
View 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
View File

@ -0,0 +1,7 @@
spec:
containers:
- name: build
image: git.pyrocufflink.net/containerimages/build/selinux:main
imagePullPolicy: Always
securityPolicy:
runAsNonRoot: true