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