Compare commits

...

2 Commits

Author SHA1 Message Date
Dustin af55085784 ci: Begin Jenkins pipeline
dustin/airplaypi/pipeline/head This commit looks good Details
2025-08-19 19:39:48 -05:00
Dustin 278e3138ab Add update-config target
This target can be used in CI to update an existing `.config` file.
2025-08-18 20:08:25 -05:00
3 changed files with 90 additions and 0 deletions

View File

@ -14,6 +14,9 @@ $(O)/.config:
O=$(O) \
$(DEFCONFIG)
.PHONY: update-config
update-config:
$(MAKE) -C $(O) $(DEFCONFIG)
%:
$(MAKE) -C $(O) $@

68
ci/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,68 @@
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 = "${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 'git submodule update --remote aimee-os'
}
}
}
stage('Build') {
steps {
sh 'make config && make update-config'
sh 'make all'
}
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',
].join(','))
}
}
}
}
}
}

19
ci/podTemplate.yaml Normal file
View File

@ -0,0 +1,19 @@
spec:
containers:
- name: build
image: git.pyrocufflink.net/containerimages/buildroot
resources:
limits: &resources
cpu: 6
memory: 12Gi
requests: *resources
volumeMounts:
- mountPath: /etc/ssh/ssh_known_hosts
name: ssh-known-hosts
subPath: ssh_known_hosts
securityContext:
fsGroupChangePolicy: OnRootMismatch
volumes:
- name: ssh-known-hosts
configMap:
name: ssh-known-hosts