wip: ci: Add Jenkins pipeline
Aimee OS/aimee-os/pipeline/head This commit looks good
Details
Aimee OS/aimee-os/pipeline/head This commit looks good
Details
parent
c1398d86aa
commit
2fb6271d38
|
@ -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