diff --git a/Jenkinsfile b/Jenkinsfile index e57eca8..9eb21c1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,36 +1,94 @@ pipeline { - agent any - stages { - stage('build and deploy') { - parallel { - stage('Branch A') { - agent any - steps { - echo "On Branch A" - } - } - stage('Branch B') { - agent any - steps { - echo "On Branch B" - } - } - stage('Branch C') { - agent any - stages { - stage('Nested 1') { - steps { - echo "In stage Nested 1 within Branch C" - } - } - stage('Nested 2') { - steps { - echo "In stage Nested 2 within Branch C" - } - } - } - } - } - } - } + agent any + + stages { + stage ('build') { + parallel { + stage ('x86') { + agent { + label 'linux && x84 && 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' + } + } + } + } + + 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' + } + } + } + } + } + } + } }