airplaypi/ci/Jenkinsfile

55 lines
1.2 KiB
Groovy

pipeline {
parameters {
booleanParam 'CLEAN_BUILD'
}
options {
disableConcurrentBuilds()
}
agent {
kubernetes {
yamlFile 'ci/podTemplate.yaml'
yamlMergeStrategy merge()
workspaceVolume persistentVolumeClaimWorkspaceVolume(
claimName: 'buildroot-airplaypi'
)
defaultContainer 'build'
}
}
environment {
BR2_CCACHE_DIR = '/home/jenkins/agent/br2-ccache'
}
stages {
stage('Clean') {
when {
expression {
return params.CLEAN_BUILD
}
}
steps {
sh 'git clean -fdx'
}
}
stage('Build') {
steps {
sh 'make config'
sh 'make all BR2_CCACHE_DIR=${BR2_CCACHE_DIR}'
}
post {
success {
dir('_build/images') {
archiveArtifacts([
'firmware.img',
'rootfs.squashfs',
'sdcard.img',
].join(','))
}
}
}
}
}
}