ci: Add Jenkins pipeline
parent
841b64bac2
commit
d41ad4c55c
|
@ -0,0 +1 @@
|
|||
/_build
|
|
@ -0,0 +1,64 @@
|
|||
pipeline {
|
||||
parameters {
|
||||
booleanParam 'CLEAN_BUILD'
|
||||
}
|
||||
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
}
|
||||
|
||||
agent {
|
||||
kubernetes {
|
||||
yamlFile 'ci/podTemplate.yaml'
|
||||
yamlMergeStrategy merge()
|
||||
workspaceVolume persistentVolumeClaimWorkspaceVolume(
|
||||
claimName: 'buildroot-aimeeos'
|
||||
)
|
||||
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 'if [ ! -d buildroot ]; then git clone https://gitlab.com/buildroot.org/buildroot.git -b 2025.05.x --depth 1; else git -C buildroot pull; fi'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'make -C buildroot O="${PWD}"/_build BR2_EXTERNAL="${PWD}" aimeeos_qemu_aarch64_defconfig'
|
||||
sh 'make -C _build'
|
||||
}
|
||||
post {
|
||||
success {
|
||||
dir('_build') {
|
||||
archiveArtifacts('.config')
|
||||
}
|
||||
dir('_build/images') {
|
||||
archiveArtifacts([
|
||||
'rootfs.squashfs',
|
||||
].join(','))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
Loading…
Reference in New Issue