1
0
Fork 0
pythonctnr/ci/Jenkinsfile

68 lines
1.7 KiB
Groovy

// vim: set ft=groovy sw=4 ts=4 sts=4 et :
pipeline {
agent {
kubernetes {
yamlFile 'ci/podTemplate.yaml'
defaultContainer 'buildroot'
workspaceVolume dynamicPVC()
}
}
options {
buildDiscarder logRotator(numToKeepStr: '5')
disableConcurrentBuilds()
}
triggers {
cron 'TZ=America/Chicago\nH H H * *'
}
stages {
stage('Prepare') {
steps {
checkout poll: false, scm: [
$class: 'GitSCM',
branches: [[name: '2022.05.x']],
doGenerateSubmoduleConfigurations: false,
userRemoteConfigs: [[url: 'git://git.buildroot.net/buildroot']],
extensions: [
[
$class: 'RelativeTargetDirectory',
relativeTargetDir: 'buildroot',
],
],
]
}
}
stage('Build') {
steps {
sh '. ci/build.sh'
}
}
stage('Build Container') {
steps {
container('buildah') {
sh '. ci/build-container.sh'
}
}
}
stage('Publish Container') {
steps {
container('buildah') {
withCredentials([usernameColonPassword(
credentialsId: 'jenkins-packages',
variable: 'BUILDAH_CREDS',
)]) {
sh '. ci/publish-container.sh'
}
}
}
}
}
}