All checks were successful
dustin/kioskpi/pipeline/head This commit looks good
Apparently, submodules don't work correctly when both `branch` and `shallow` are specified. It seems `git` fetches the latest commit and _then_ tries to switch branches, which always fails: > Unable to find refs/remotes/origin/2025.08.x revision in submodule > path 'buildroot' Let's just get rid of the submodule and do a shallow clone of `buildroot` manually during the build.
92 lines
2.6 KiB
Groovy
92 lines
2.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('Prepare') {
|
|
steps {
|
|
checkout(
|
|
poll: false,
|
|
scm: scmGit(
|
|
branches: [[name: 'refs/heads/2025.08.x']],
|
|
browser: gitLab('https://gitlab.com/buildroot.org/buildroot/'),
|
|
extensions: [
|
|
[
|
|
$class: 'RelativeTargetDirectory',
|
|
relativeTargetDir: 'buildroot',
|
|
],
|
|
cloneOption(
|
|
shallow: true,
|
|
depth: 1,
|
|
),
|
|
],
|
|
userRemoteConfigs: [[
|
|
url: 'https://gitlab.com/buildroot.org/buildroot.git',
|
|
]],
|
|
)
|
|
)
|
|
}
|
|
}
|
|
|
|
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(','))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|