Updated Jenkinsfile

This commit is contained in:
WolverinDEV 2018-11-01 16:35:37 +01:00
parent b67feb20e1
commit b9165d89ef

111
Jenkinsfile vendored
View File

@ -31,6 +31,10 @@ pipeline {
stages { stages {
stage ('Initialize libraries') { stage ('Initialize libraries') {
when {
expression { params.build_libraries }
}
steps { steps {
sh 'apt-get update' sh 'apt-get update'
sh 'git reset --hard origin/master; git submodule update --init --remote --recursive --force' sh 'git reset --hard origin/master; git submodule update --init --remote --recursive --force'
@ -39,18 +43,27 @@ pipeline {
sh 'cd libraries; ./build.sh' sh 'cd libraries; ./build.sh'
} }
} }
stage ('Build TeaSpeak') {
stage ('Build TeaSpeak Debug') {
environment { environment {
TEASPEAK_BUILD_TYPE="Debug" TEASPEAK_BUILD_TYPE="Debug"
} }
steps { stages {
sh './build_teaspeak.sh' stage ('build') {
} steps {
} sh './build_teaspeak.sh'
stage ('Deploy') { }
steps { }
sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/x86' stage ('deploy') {
when {
expression { params.deploy_build }
}
steps {
sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/x86'
}
}
} }
} }
} }
@ -91,49 +104,53 @@ pipeline {
} }
} }
stage ('Build TeaSpeak Debug') { stage ('Build TeaSpeak') {
environment { parallel {
TEASPEAK_BUILD_TYPE="Debug" stage ('Build TeaSpeak Debug') {
} environment {
TEASPEAK_BUILD_TYPE="Debug"
stages { }
stage ('build') {
steps { stages {
sh './build_teaspeak.sh' stage ('build') {
steps {
sh './build_teaspeak.sh'
}
}
stage ('deploy') {
when {
expression { params.deploy_build }
}
steps {
sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/amd64'
}
}
} }
} }
stage ('deploy') {
stage ('Build TeaSpeak Release') {
when { when {
expression { params.deploy_build == true } expression { params.build_optimized }
} }
steps {
sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/amd64' environment {
TEASPEAK_BUILD_TYPE="Release"
} }
}
} stages {
} stage ('build') {
steps {
stage ('Build TeaSpeak Release') { sh './build_teaspeak.sh'
when { }
expression { params.build_optimized == true } }
} stage ('deploy') {
when {
environment { expression { params.deploy_build == true }
TEASPEAK_BUILD_TYPE="Release" }
} steps {
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'
} }
} }
} }