Jenkinsfile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 '''. /opt/rh/devtoolset-8/enable
  13. rm -rf build/
  14. mkdir build && cd build
  15. cmake ..
  16. make -j4
  17. ./zerotier-selftest
  18. '''
  19. }
  20. }
  21. catch (err) {
  22. currentBuild.result = "FAILURE"
  23. mattermostSend color: '#ff0000', message: "${env.JOB_NAME} broken on Centos 7 (<${env.BUILD_URL}|Open>)"
  24. throw err
  25. }
  26. }
  27. // }, 'android-ndk': {
  28. // node('android-ndk') {
  29. // try {
  30. // checkout scm
  31. // stage('Build Android NDK') {
  32. // sh "/android/android-ndk-r15b/ndk-build -C $WORKSPACE/java ZT1=${WORKSPACE}"
  33. // }
  34. // }
  35. // catch (err) {
  36. // currentBuild.result = "FAILURE"
  37. // mattermostSend color: '#ff0000', message: "${env.JOB_NAME} broken on Android NDK (<${env.BUILD_URL}|Open>)"
  38. // throw err
  39. // }
  40. // }
  41. // }, 'macOS': {
  42. // node('macOS') {
  43. // try {
  44. // checkout scm
  45. // stage('Build macOS') {
  46. // sh 'make -f make-mac.mk'
  47. // }
  48. // stage('Build macOS UI') {
  49. // sh 'cd macui && xcodebuild -target "ZeroTier One" -configuration Debug'
  50. // }
  51. // }
  52. // catch (err) {
  53. // currentBuild.result = "FAILURE"
  54. // mattermostSend color: '#ff0000', message: "${env.JOB_NAME} broken on macOS (<${env.BUILD_URL}|Open>)"
  55. // throw err
  56. // }
  57. // }
  58. // }, 'windows': {
  59. // node('windows') {
  60. // try {
  61. // checkout scm
  62. // stage('Build Windows') {
  63. // bat '''CALL "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat" amd64
  64. // git clean -dfx
  65. // msbuild windows\\ZeroTierOne.sln
  66. // '''
  67. // }
  68. // }
  69. // catch (err) {
  70. // currentBuild.result = "FAILURE"
  71. // mattermostSend color: '#ff0000', message: "${env.JOB_NAME} broken on Windows (<${env.BUILD_URL}|Open>)"
  72. // throw err
  73. // }
  74. // }
  75. }
  76. mattermostSend color: "#00ff00", message: "${env.JOB_NAME} #${env.BUILD_NUMBER} Complete (<${env.BUILD_URL}|Show More...>)"