The `system-update` and `install-update` scripts are the same as from Aimee OS v1, with references to Gentoo replaced, of course. We need some additional kernel features in order to mount the firmware partition and update the GRUB environment file, and of course the `grub-editenv` tool itself. We also need `wget` for now, since that's how the tool downloads the specified update file from the network. Eventually, `system-update` will be replaced by a much more robust tool, with package URL discovery, signature verification, etc. The shell script will do for now while development is still proceeding rapidly.
76 lines
2.0 KiB
Groovy
76 lines
2.0 KiB
Groovy
pipeline {
|
|
parameters {
|
|
booleanParam 'CLEAN_BUILD'
|
|
string 'CUSTOM_TARGET'
|
|
}
|
|
|
|
options {
|
|
disableConcurrentBuilds()
|
|
}
|
|
|
|
agent {
|
|
kubernetes {
|
|
yamlFile 'ci/podTemplate.yaml'
|
|
yamlMergeStrategy merge()
|
|
workspaceVolume persistentVolumeClaimWorkspaceVolume(
|
|
claimName: 'buildroot-aimeeos'
|
|
)
|
|
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 {
|
|
container('jnlp') {
|
|
sh 'if [ ! -d buildroot ]; then git clone https://gitlab.com/buildroot.org/buildroot.git -b 2025.05.x --depth 1; else git -C buildroot pull; fi'
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Build') {
|
|
steps {
|
|
sh 'make -C buildroot O="${PWD}"/_build BR2_EXTERNAL="${PWD}" aimeeos_qemu_aarch64_defconfig'
|
|
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.zst',
|
|
].join(','))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|