Jenkinsfile 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #!/usr/bin/env groovy
  2. node('master') {
  3. checkout scm
  4. def changelog = getChangeLog currentBuild
  5. mattermostSend "Building ${env.JOB_NAME} #${env.BUILD_NUMBER} \n Change Log: \n ${changelog}"
  6. }
  7. parallel 'centos7': {
  8. node('centos7') {
  9. try {
  10. checkout scm
  11. stage('Build Centos 7') {
  12. sh 'make -f make-linux.mk'
  13. }
  14. }
  15. catch (err) {
  16. currentBuild.result = "FAILURE"
  17. mattermostSend color: '#ff0000', message: "${env.JOB_NAME} broken on Centos 7 (<${env.BUILD_URL}|Open>)"
  18. throw err
  19. }
  20. }
  21. // }, 'android-ndk': {
  22. // node('android-ndk') {
  23. // try {
  24. // checkout scm
  25. // stage('Build Android NDK') {
  26. // sh "/android/android-ndk-r15b/ndk-build -C $WORKSPACE/java ZT1=${WORKSPACE}"
  27. // }
  28. // }
  29. // catch (err) {
  30. // currentBuild.result = "FAILURE"
  31. // mattermostSend color: '#ff0000', message: "${env.JOB_NAME} broken on Android NDK (<${env.BUILD_URL}|Open>)"
  32. // throw err
  33. // }
  34. // }
  35. }, 'macOS': {
  36. node('macOS') {
  37. try {
  38. checkout scm
  39. stage('Build macOS') {
  40. sh 'make -f make-mac.mk'
  41. }
  42. stage('Build macOS UI') {
  43. sh 'cd macui && xcodebuild -target "ZeroTier One" -configuration Debug'
  44. }
  45. }
  46. catch (err) {
  47. currentBuild.result = "FAILURE"
  48. mattermostSend color: '#ff0000', message: "${env.JOB_NAME} broken on macOS (<${env.BUILD_URL}|Open>)"
  49. throw err
  50. }
  51. }
  52. }, 'windows': {
  53. node('windows') {
  54. try {
  55. checkout scm
  56. stage('Build Windows') {
  57. bat '''CALL "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat" x64
  58. msbuild windows\\ZeroTierOne.sln
  59. '''
  60. }
  61. }
  62. catch (err) {
  63. currentBuild.result = "FAILURE"
  64. mattermostSend color: '#ff0000', message: "${env.JOB_NAME} broken on Windows (<${env.BUILD_URL}|Open>)"
  65. throw err
  66. }
  67. }
  68. }
  69. mattermostSend color: "#00ff00", message: "${env.JOB_NAME} #${env.BUILD_NUMBER} Complete (<${env.BUILD_URL}|Show More...>)"