1
0
Fork 0

wip: ci
infra/dch-selinux/pipeline/head This commit looks good Details

Dustin 2022-12-19 11:07:30 -06:00
parent 1f82242a0e
commit dbe29758c2
2 changed files with 48 additions and 0 deletions

41
ci/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,41 @@
// vim: set sw=4 ts=4 sts=4 et :
pipeline {
environment {
GITEA_URL = 'https://git.pyrocufflink.net'
}
agent {
kubernetes {
yamlFile 'ci/podTemplate.yaml'
defaultContainer 'build'
}
}
stages {
stage('Build') {
steps {
sh 'make rpm'
}
}
stage('Publish') {
steps {
withCredentials([usernamePassword(
credentialsId: 'jenkins-packages',
usernameVariable: 'USERNAME',
passwordVariable: 'PASSWORD',
)]) {
sh 'curl -f -u "${USERNAME}:${PASSWORD}" -T *.rpm ${GITEA_URL}/api/packages/infra/rpm/upload'
}
}
}
}
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