2016-10-25 18:10:21 +00:00
|
|
|
#!/usr/bin/env groovy
|
|
|
|
|
2016-10-25 22:01:59 +00:00
|
|
|
node('master') {
|
2016-10-25 22:51:30 +00:00
|
|
|
def changelog = getChangeLog currentBuild
|
2016-10-25 22:01:59 +00:00
|
|
|
|
2016-10-25 22:51:30 +00:00
|
|
|
slackSend "Building ${env.JOB_NAME} #${env.BUILD_NUMBER} \n Change Log: \n ${changelog}"
|
2016-10-25 22:01:59 +00:00
|
|
|
}
|
2016-10-25 21:58:27 +00:00
|
|
|
|
2016-10-25 18:10:21 +00:00
|
|
|
parallel 'centos7': {
|
|
|
|
node('centos7') {
|
2016-10-25 21:35:31 +00:00
|
|
|
try {
|
|
|
|
checkout scm
|
2016-10-25 18:10:21 +00:00
|
|
|
|
2016-10-25 21:35:31 +00:00
|
|
|
stage('Build Centos 7') {
|
|
|
|
sh 'make -f make-linux.mk'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (err) {
|
|
|
|
currentBuild.result = "FAILURE"
|
2016-10-25 21:38:57 +00:00
|
|
|
slackSend color: '#ff0000', message: "${env.JOB_NAME} broken on Centos 7 (<${env.BUILD_URL}|Open>)"
|
2016-10-25 21:35:31 +00:00
|
|
|
|
|
|
|
throw err
|
2016-10-25 18:18:26 +00:00
|
|
|
}
|
2016-10-25 18:10:21 +00:00
|
|
|
}
|
|
|
|
}, 'android-ndk': {
|
|
|
|
node('android-ndk') {
|
2016-10-25 21:35:31 +00:00
|
|
|
try {
|
|
|
|
checkout scm
|
2016-10-25 18:18:26 +00:00
|
|
|
|
2016-10-25 21:35:31 +00:00
|
|
|
stage('Build Android NDK') {
|
2016-10-27 21:28:42 +00:00
|
|
|
sh "/android/android-ndk-r13b/ndk-build -C $WORKSPACE/java ZT1=${WORKSPACE}"
|
2016-10-25 21:35:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (err) {
|
|
|
|
currentBuild.result = "FAILURE"
|
2016-10-25 21:38:57 +00:00
|
|
|
slackSend color: '#ff0000', message: "${env.JOB_NAME} broken on Android NDK (<${env.BUILD_URL}|Open>)"
|
2016-10-25 21:35:31 +00:00
|
|
|
|
|
|
|
throw err
|
2016-10-25 18:18:26 +00:00
|
|
|
}
|
2016-10-25 18:10:21 +00:00
|
|
|
}
|
2016-10-25 19:40:03 +00:00
|
|
|
}, 'macOS': {
|
|
|
|
node('macOS') {
|
2016-10-25 21:35:31 +00:00
|
|
|
try {
|
|
|
|
checkout scm
|
|
|
|
|
|
|
|
stage('Build macOS') {
|
|
|
|
sh 'make -f make-mac.mk'
|
|
|
|
}
|
2016-10-25 19:40:03 +00:00
|
|
|
|
2016-10-25 21:35:31 +00:00
|
|
|
stage('Build macOS UI') {
|
|
|
|
sh 'cd macui && xcodebuild -target "ZeroTier One" -configuration Debug'
|
|
|
|
}
|
2016-10-25 19:40:03 +00:00
|
|
|
}
|
2016-10-25 21:35:31 +00:00
|
|
|
catch (err) {
|
|
|
|
currentBuild.result = "FAILURE"
|
2016-10-25 21:38:57 +00:00
|
|
|
slackSend color: '#ff0000', message: "${env.JOB_NAME} broken on macOS (<${env.BUILD_URL}|Open>)"
|
2016-10-25 19:58:54 +00:00
|
|
|
|
2016-10-25 21:35:31 +00:00
|
|
|
throw err
|
2016-10-25 19:58:54 +00:00
|
|
|
}
|
2016-10-25 19:40:03 +00:00
|
|
|
}
|
2016-11-28 21:06:28 +00:00
|
|
|
}, 'windows': {
|
|
|
|
node('windows') {
|
|
|
|
try {
|
|
|
|
checkout scm
|
|
|
|
|
|
|
|
stage('Build Windows') {
|
|
|
|
bat '''CALL "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat" amd64
|
|
|
|
|
|
|
|
devenv windows\\ZeroTierOne.sln /clean
|
|
|
|
devenv windows\\ZeroTierOne.sln /build
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (err) {
|
|
|
|
currentBuild.result = "FAILURE"
|
|
|
|
slackSend color: '#ff0000', message: "${env.JOB_NAME} broken on Windows (<${env.BUILD_URL}|Open>)"
|
|
|
|
}
|
|
|
|
}
|
2016-10-25 18:10:21 +00:00
|
|
|
}
|
2016-10-25 21:35:31 +00:00
|
|
|
|
2016-10-27 21:01:00 +00:00
|
|
|
slackSend color: "#00ff00", message: "${env.JOB_NAME} #${env.BUILD_NUMBER} Complete (<${env.BUILD_URL}|Show More...>)"
|