From ddc2fa497128e89f60427ccc817ef7bceeac6b1e Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Fri, 1 Aug 2025 18:07:29 -0500 Subject: [PATCH] wip: Add Jenkins build pipeline --- ci/Jenkinsfile | 20 ++++++++++++++++++++ ci/build.sh | 7 +++++++ ci/podTemplate.yaml | 12 ++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 ci/Jenkinsfile create mode 100644 ci/build.sh create mode 100644 ci/podTemplate.yaml diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile new file mode 100644 index 0000000..11e7cd8 --- /dev/null +++ b/ci/Jenkinsfile @@ -0,0 +1,20 @@ +pipeline { + agent { + kubernetes { + yamlFile 'ci/podTemplate.yaml' + yamlMergeStrategy merge() + workspaceVolume persistentVolumeClaimWorkspaceVolume( + claimName: 'buildroot-kitchenos' + ) + defaultContainer 'build' + } + } + + stages { + stage('Build') { + steps { + sh '. ci/build.sh' + } + } + } +} diff --git a/ci/build.sh b/ci/build.sh new file mode 100644 index 0000000..835cd4b --- /dev/null +++ b/ci/build.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ ! -f _build/.config ]; then + make O="${PWD}"/_build kitchenos_defconfig +fi + +make -C _build diff --git a/ci/podTemplate.yaml b/ci/podTemplate.yaml new file mode 100644 index 0000000..cb947e6 --- /dev/null +++ b/ci/podTemplate.yaml @@ -0,0 +1,12 @@ +spec: + containers: + - name: build + image: git.pyrocufflink.net/containerimages/buildroot + 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