pipeline { parameters { booleanParam 'CLEAN_BUILD' } options { disableConcurrentBuilds() } agent { kubernetes { yamlFile 'ci/podTemplate.yaml' yamlMergeStrategy merge() workspaceVolume persistentVolumeClaimWorkspaceVolume( claimName: 'buildroot-kitchenos' ) defaultContainer 'build' } } stages { stage('Clean') { when { expression { params.CLEAN_BUILD == 'true' } } steps { sh 'git clean -fdx' sh 'rm -rf buildroot' } } stage('Build') { steps { sh '. ci/build.sh' } post { success { dir('_build/images') { archiveArtifacts 'sdcard.img' } } } } } }