Files
photoframe2/ci/Jenkinsfile
Dustin C. Hatch 43d15bdbf8 ci: Prevent concurrent builds
The `disableConcurrentBuilds` pipeline option tells Jenkins to force
subsequent builds _of the same job_ to wait in queue until the one
running has completed.  This is sufficient when there is only one
branch/project in development at a time.  In order to prevent multiple
projects from running simultaneously, we need to acquire a global lock;
all projects need to have this same option in order for it to be
effective.
2024-12-31 13:11:47 -06:00

39 lines
801 B
Groovy

// vim: set sw=4 ts=4 sts=4 et :
pipeline {
agent {
kubernetes {
yamlFile 'ci/podTemplate.yaml'
defaultContainer 'build'
yamlMergeStrategy merge()
}
}
options {
disableConcurrentBuilds()
lock 'aimee-os'
}
stages {
stage('Prepare') {
steps {
sh '. ./prepare.sh'
}
}
stage('Build') {
steps {
sh 'env -i PATH="${PATH}" make -C aimee-os CONFIGDIR=${PWD} O=/build'
}
}
}
post {
success {
dir('/home/jenkins/agent/_build/images') {
sh 'zstd --rm sdcard.img & zstd --rm firmware.img & wait'
archiveArtifacts '*'
}
}
}
}