diff --git a/Jenkinsfile b/Jenkinsfile index 2341ad9..9c9f1db 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,9 @@ pipeline { agent any + + parameters { + booleanParam(defaultValue: true, description: 'Enabled/disables the building of an optimized build', name: 'build_optimized') + } stages { stage ('build') { @@ -34,6 +38,10 @@ pipeline { } } stage ('Build TeaSpeak') { + environment { + TEASPEAK_BUILD_TYPE="Debug" + } + steps { sh './build_teaspeak.sh' } @@ -76,14 +84,30 @@ pipeline { } } - stage ('Build TeaSpeak') { + + stage ('Build TeaSpeak Debug') { + environment { + TEASPEAK_BUILD_TYPE="Debug" + } + steps { sh './build_teaspeak.sh' + sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/amd64' } } - stage ('Deploy') { + + stage ('Build TeaSpeak Release') { + when { + expression { params.build_optimized } + } + + environment { + TEASPEAK_BUILD_TYPE="Release" + } + steps { - sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/amd64' + sh './build_teaspeak.sh' + sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/amd64_optimized' } } }