Some checks failed
dustin/kioskpi/pipeline/head There was a failure building this commit
67 lines
1.6 KiB
Groovy
67 lines
1.6 KiB
Groovy
pipeline {
|
|
parameters {
|
|
booleanParam 'CLEAN_BUILD'
|
|
string 'CUSTOM_TARGET'
|
|
}
|
|
|
|
options {
|
|
disableConcurrentBuilds()
|
|
}
|
|
|
|
agent {
|
|
kubernetes {
|
|
yamlFile 'ci/podTemplate.yaml'
|
|
workspaceVolume persistentVolumeClaimWorkspaceVolume(
|
|
claimName: 'buildroot'
|
|
)
|
|
defaultContainer 'build'
|
|
}
|
|
}
|
|
|
|
environment {
|
|
BR2_CCACHE_DIR = "${env.JENKINS_AGENT_WORKDIR}/br2-ccache"
|
|
}
|
|
|
|
stages {
|
|
stage('Clean') {
|
|
when {
|
|
expression {
|
|
return params.CLEAN_BUILD
|
|
}
|
|
}
|
|
steps {
|
|
sh 'git clean -fdx'
|
|
}
|
|
}
|
|
|
|
stage('Build') {
|
|
steps {
|
|
sh '. ci/defconfig.sh'
|
|
script {
|
|
if (params.CUSTOM_TARGET) {
|
|
sh "make -C _build '${CUSTOM_TARGET}'"
|
|
}
|
|
}
|
|
sh 'make -C _build'
|
|
}
|
|
post {
|
|
success {
|
|
dir('_build') {
|
|
archiveArtifacts('.config')
|
|
}
|
|
dir('_build/images') {
|
|
sh 'zstd -f firmware.img'
|
|
sh 'zstd -f sdcard.img'
|
|
archiveArtifacts([
|
|
'firmware.img.zst',
|
|
'rootfs.squashfs',
|
|
'sdcard.img.zst',
|
|
'update.tar.zstd',
|
|
].join(','))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|