diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile new file mode 100644 index 0000000..caa909c --- /dev/null +++ b/ci/Jenkinsfile @@ -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 '*' + } + } + } +} diff --git a/ci/podTemplate.yaml b/ci/podTemplate.yaml new file mode 100644 index 0000000..7ea65cf --- /dev/null +++ b/ci/podTemplate.yaml @@ -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