diff --git a/Jenkinsfile b/Jenkinsfile index b8f39c6..ac07e4a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,6 +4,7 @@ pipeline { parameters { booleanParam(defaultValue: true, description: 'Enabled/disables the building of an optimized build', name: 'build_optimized') booleanParam(defaultValue: true, description: 'Build the libraries as well', name: 'build_libraries') + booleanParam(defaultValue: true, description: 'Deploy this build', name: 'deploy_build') } stages { @@ -95,24 +96,46 @@ pipeline { TEASPEAK_BUILD_TYPE="Debug" } - steps { - sh './build_teaspeak.sh' - sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/amd64' + stages { + stage ('build') { + steps { + sh './build_teaspeak.sh' + } + } + stage ('deploy') { + when { + expression { params.deploy_build == true } + } + steps { + sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/amd64' + } + } } } stage ('Build TeaSpeak Release') { when { - expression { params.build_optimized } + expression { params.build_optimized == true } } environment { TEASPEAK_BUILD_TYPE="Release" } - steps { - sh './build_teaspeak.sh' - sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/amd64_optimized' + stages { + stage ('build') { + steps { + sh './build_teaspeak.sh' + } + } + stage ('deploy') { + when { + expression { params.deploy_build == true } + } + steps { + sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/amd64_optimized' + } + } } } }