From 863078e2378c7a524efb38d9fc37a87ae6f92113 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 17 Aug 2025 21:53:24 -0500 Subject: [PATCH] wip: ci: Begin Jenkins pipeline --- ci/Jenkinsfile | 50 +++++++++++++++++++++++++++++++++++++++++++++ ci/podTemplate.yaml | 17 +++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 ci/Jenkinsfile create mode 100644 ci/podTemplate.yaml diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile new file mode 100644 index 0000000..60284c6 --- /dev/null +++ b/ci/Jenkinsfile @@ -0,0 +1,50 @@ +pipeline { + parameters { + booleanParam 'CLEAN_BUILD' + } + + options { + disableConcurrentBuilds() + } + + agent { + kubernetes { + yamlFile 'ci/podTemplate.yaml' + yamlMergeStrategy merge() + workspaceVolume persistentVolumeClaimWorkspaceVolume( + claimName: 'buildroot-airplaypi' + ) + defaultContainer 'build' + } + } + + stages { + stage('Clean') { + when { + expression { + params.CLEAN_BUILD == 'true' + } + } + steps { + sh 'git clean -fdx' + } + } + stage('Build') { + steps { + sh 'make config' + sh 'make' + } + post { + success { + dir('_build/images') { + archiveArtifacts([ + 'firmware.img', + 'rootfs.squashfs', + 'sdcard.img', + ].join(',')) + } + } + } + } + } +} diff --git a/ci/podTemplate.yaml b/ci/podTemplate.yaml new file mode 100644 index 0000000..2f3514b --- /dev/null +++ b/ci/podTemplate.yaml @@ -0,0 +1,17 @@ +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 + volumes: + - name: ssh-known-hosts + configMap: + name: ssh-known-hosts