ci: Begin Jenkins build pipeline
dustin/photoframe2/pipeline/head This commit looks good Details

main
Dustin 2024-12-08 16:04:54 -06:00
parent a9fe599978
commit adf77e301c
2 changed files with 59 additions and 0 deletions

27
ci/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,27 @@
// vim: set sw=4 ts=4 sts=4 et :
pipeline {
agent {
kubernetes {
yamlFile 'ci/podTemplate.yaml'
defaultContainer 'build'
yamlMergeStrategy merge()
}
}
stages {
stage('Build') {
steps {
sh 'make -C aimee-os CONFIGDIR=${PWD} O=/build'
}
}
}
post {
success {
dir('/home/jenkins/agent/_build/images') {
sh 'zstd --rm sdcard.img & zstd --rm firmware.img & wait'
archiveArtifacts '*'
}
}
}
}

32
ci/podTemplate.yaml Normal file
View File

@ -0,0 +1,32 @@
spec:
containers:
- name: build
image: git.pyrocufflink.net/aimeeos/build/build-aarch64-unknown-linux-gnu
command:
- /bin/sh
- -c
- |
trap 'kill $!; exit' TERM
sleep infinity &
wait
securityContext:
capabilities:
add:
- CAP_SETFCAP
volumeMounts:
- mountPath: /build
name: workspace-volume
subPath: _build
- mountPath: /mnt/gentoo
name: workspace-volume
subPath: gentoo
- mountPath: /usr/aarch64-unknown-linux-gnu/var/cache/binpkgs
name: workspace-volume
subPath: binpkgs
- mountPath: /var/cache/binpkgs
name: workspace-volume
subPath: binpkgs
- mountPath: /var/cache/distfiles
name: workspace-volume
subPath: distfiles
hostUsers: false