1
0
Fork 0
dch-selinux/ci/Jenkinsfile

42 lines
887 B
Groovy

// 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'
}
}
}