Updated Jenkinsfile

This commit is contained in:
WolverinDEV 2018-11-01 16:28:05 +01:00
parent 79d7e16378
commit b67feb20e1

37
Jenkinsfile vendored
View File

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