77 lines
2.1 KiB
Groovy
77 lines
2.1 KiB
Groovy
// vim: set sw=4 ts=4 sts=4 et :
|
|
// vim: set ft=groovy :
|
|
|
|
pipeline {
|
|
agent {
|
|
kubernetes {
|
|
yamlFile 'ci/podTemplate.yaml'
|
|
}
|
|
}
|
|
|
|
stages {
|
|
stage('Build') {
|
|
parallel {
|
|
stage('Build Backend') {
|
|
steps {
|
|
container('python') {
|
|
dir('svc') {
|
|
sh '. ../ci/build-svc.sh'
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
success {
|
|
dir('svc/dist') {
|
|
archiveArtifacts 'hudctrl-*'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Build Frontend') {
|
|
steps {
|
|
container('node') {
|
|
dir('ui') {
|
|
sh '. ../ci/build-ui.sh'
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
success {
|
|
dir('ui') {
|
|
archiveArtifacts 'hudctrl-ui.tar.gz'
|
|
}
|
|
}
|
|
failure {
|
|
dir('ui/npm_cache/_logs') {
|
|
archiveArtifacts '*'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Build Container') {
|
|
steps {
|
|
container('podman') {
|
|
sh '. ci/build-container.sh'
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Publish Container') {
|
|
steps {
|
|
container('podman') {
|
|
withCredentials([usernameColonPassword(
|
|
credentialsId: 'jenkins-packages',
|
|
variable: 'PODMAN_AUTH',
|
|
)]) {
|
|
sh '. ci/publish-container.sh'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|