Updated jenkins file

This commit is contained in:
WolverinDEV 2018-08-09 21:57:58 +02:00
parent ef876f6bd2
commit 1daf1ee8fe

92
Jenkinsfile vendored
View File

@ -1,31 +1,89 @@
pipeline { pipeline {
agent any agent any
stages { stages {
stage('build and deploy') { stage ('build') {
parallel { parallel {
stage('Branch A') { stage ('x86') {
agent any agent {
steps { label 'linux && x84 && teaspeak'
echo "On Branch A"
} }
environment {
//General flags
CXX_FLAGS = ''
C_FLAGS = ''
//CMake specific flags
CMAKE_OPTIONS = ''
CMAKE_MAKE_OPTIONS = ''
//Make specific flags
MAKE_OPTIONS = ''
} }
stage('Branch B') {
agent any
steps {
echo "On Branch B"
}
}
stage('Branch C') {
agent any
stages { stages {
stage('Nested 1') { stage ('Initialize libraries') {
steps { steps {
echo "In stage Nested 1 within Branch C" sh 'apt-get update'
sh 'git submodule update --init --remote --recursive'
sh 'git submodule update --merge'
sh './attach_modules.sh'
sh 'cd libraries; ./build.sh'
} }
} }
stage('Nested 2') { stage ('Build TeaSpeak') {
steps { steps {
echo "In stage Nested 2 within Branch C" sh './build_teaspeak.sh'
}
}
stage ('Deploy') {
steps {
sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/x84'
}
}
}
}
stage ('amd64') {
agent {
label 'linux && amd64 && teaspeak'
}
environment {
//General flags
CXX_FLAGS = ''
C_FLAGS = ''
//CMake specific flags
CMAKE_OPTIONS = ''
CMAKE_MAKE_OPTIONS = ''
//Make specific flags
MAKE_OPTIONS = ''
}
stages {
stage ('Initialize libraries') {
steps {
sh 'apt-get update'
sh 'git submodule update --init --remote --recursive'
sh 'git submodule update --merge'
sh './attach_modules.sh'
sh 'cd libraries; ./build.sh'
}
}
stage ('Build TeaSpeak') {
steps {
sh './build_teaspeak.sh'
}
}
stage ('Deploy') {
steps {
sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/x84'
} }
} }
} }