115 lines
3.5 KiB
Groovy
115 lines
3.5 KiB
Groovy
pipeline {
|
|
parameters {
|
|
booleanParam 'CLEAN_BUILD'
|
|
string 'CUSTOM_TARGET'
|
|
}
|
|
|
|
options {
|
|
disableConcurrentBuilds()
|
|
}
|
|
|
|
agent {
|
|
kubernetes {
|
|
yamlFile 'ci/podTemplate.yaml'
|
|
workspaceVolume persistentVolumeClaimWorkspaceVolume(
|
|
claimName: 'buildroot-airplaypi'
|
|
)
|
|
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/tags/2025.05.1']],
|
|
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',
|
|
]],
|
|
)
|
|
)
|
|
checkout(
|
|
poll: false,
|
|
scm: scmGit(
|
|
branches: [[name: 'refs/heads/master']],
|
|
browser: [
|
|
$class: 'GiteaBrowser',
|
|
repoUrl: 'https://git.pyrocufflink.net/AimeeOS/aimee-os'
|
|
],
|
|
extensions: [
|
|
[
|
|
$class: 'RelativeTargetDirectory',
|
|
relativeTargetDir: 'aimee-os',
|
|
],
|
|
cloneOption(
|
|
shallow: true,
|
|
depth: 1,
|
|
),
|
|
],
|
|
userRemoteConfigs: [[
|
|
url: 'https://git.pyrocufflink.net/AimeeOS/aimee-os.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(','))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|