From b80b6dfd58f4461a56cf1b809ebf2f610b23d3ce Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Thu, 1 Nov 2018 16:16:06 +0100 Subject: [PATCH] Updated jenkins file --- Jenkinsfile | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) 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' } } }