Updated Jenkinsfile

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

105
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 { stages {
stage ('build') { stage ('build') {
steps { steps {
sh './build_teaspeak.sh' 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'
}
}
}
}
stage ('Build TeaSpeak Release') { environment {
when { TEASPEAK_BUILD_TYPE="Release"
expression { params.build_optimized == true }
}
environment {
TEASPEAK_BUILD_TYPE="Release"
}
stages {
stage ('build') {
steps {
sh './build_teaspeak.sh'
} }
}
stage ('deploy') { stages {
when { stage ('build') {
expression { params.deploy_build == true } steps {
} sh './build_teaspeak.sh'
steps { }
sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/amd64_optimized' }
stage ('deploy') {
when {
expression { params.deploy_build == true }
}
steps {
sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/amd64_optimized'
}
}
} }
} }
} }