pipeline { agent { dockerfile { filename 'Dockerfile' dir '.' } } parameters { booleanParam(name: 'CLEAN', defaultValue: false, description: 'Clean build') booleanParam(name: 'BUILD_EDITOR', defaultValue: true, description: 'Build the editor binary') booleanParam(name: 'BUILD_DEBUG_TEMPLATES', defaultValue: true, description: 'Build templates in debug mode.') booleanParam(name: 'BUILD_RELEASE_TEMPLATES', defaultValue: true, description: 'Build templates in release mode.') booleanParam(name: 'BUILD_EDITOR_WINDOWS', defaultValue: true, description: 'Build the editor binary for Windows.') booleanParam(name: 'BUILD_DEBUG_TEMPLATES_WINDOWS', defaultValue: true, description: 'Build templates in debug mode for Windows.') booleanParam(name: 'BUILD_RELEASE_TEMPLATES_WINDOWS', defaultValue: true, description: 'Build templates in release mode for Windows.') string(name: 'REMOTE', defaultValue: 'https://github.com/godotengine/godot.git', description: 'Repository to build from') string(name: 'BRANCH', defaultValue: '*/master') } stages { stage('Checkout') { steps { checkout scmGit( branches: [[name: BRANCH]], extensions: [], userRemoteConfigs: [[url: REMOTE]] ) } } stage('Clean') { when { expression { params.CLEAN } } steps { sh 'scons platform=linuxbsd -c' } } stage('Build Linux Editor') { when { expression { params.BUILD_EDITOR } } steps { sh 'scons -j8 platform=linuxbsd debug_symbols=yes use_lto=yes' } } stage('Build Linux Debug Templates') { when { expression { params.BUILD_DEBUG_TEMPLATES } } steps { sh 'scons -j8 platform=linuxbsd target=template_release use_lto=yes' } } stage('Build Linux Release Templates') { when { expression { params.BUILD_RELEASE_TEMPLATES } } steps { sh 'scons -j8 platform=linuxbsd target=template_debug use_lto=yes' } } stage('Build Windows Editor') { when { expression { params.BUILD_EDITOR_WINDOWS } } steps { sh 'scons -j8 platform=windows arch=x86_64 use_lto=yes' } } stage('Build Windows Debug Templates') { when { expression { params.BUILD_DEBUG_TEMPLATES_WINDOWS } } steps { sh 'scons -j8 platform=windows target=template_release arch=x86_64 use_lto=yes' } } stage('Build Windows Release Templates') { when { expression { params.BUILD_RELEASE_TEMPLATES_WINDOWS } } steps { sh 'scons -j8 platform=windows target=template_debug arch=x86_64 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: ''; } } }