pipeline { agent { dockerfile { filename 'Dockerfile' dir 'build' } } parameters { booleanParam(name: 'CLEAN', defaultValue: false, description: 'Clean build') } stages { stage('Clean') { when { expression { params.CLEAN } } steps { sh 'scons platform=linuxbsd -c' } } stage('Build Linux GCC') { steps { sh 'scons -j8 platform=linuxbsd use_lto=yes' sh 'scons -j8 platform=linuxbsd target=template_release use_lto=yes' sh 'scons -j8 platform=linuxbsd target=template_debug use_lto=yes' } } stage('Archive') { steps { archiveArtifacts artifacts: 'bin/*', fingerprint: true, onlyIfSuccessful: true } } } post { failure { mail from: 'Jenkins ', to: 'jenkins@mewin.de', cc: '', bcc: '', subject: "Jenkins Build Error (${env.JOB_NAME})", body: "Build Failure
Project: ${env.JOB_NAME}
Build Number: ${env.BUILD_NUMBER}
Build URL: ${env.BUILD_URL}", charset: 'UTF-8', mimeType: 'text/html', replyTo: ''; } } }