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(',')) } } } } } }