Jenkinsfile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. pipeline {
  2. agent {label '132'}
  3. stages {
  4. stage('preperation') {
  5. steps {
  6. catchError {
  7. sh 'target/o2server/stop_linux.sh'
  8. }
  9. sh 'npm install'
  10. sh 'npm run preperation:linux'
  11. }
  12. }
  13. stage('build') {
  14. parallel {
  15. stage('build server') {
  16. steps {
  17. sh 'id'
  18. sh 'npm run build_server'
  19. }
  20. }
  21. stage('build web') {
  22. steps {
  23. sh 'npm run build_web'
  24. }
  25. }
  26. }
  27. }
  28. stage('deploy') {
  29. steps {
  30. sh 'npm run deploy:linux'
  31. sh 'chmod 777 target/o2server/*.sh'
  32. }
  33. }
  34. stage('run') {
  35. steps {
  36. //sh 'nohup target/o2server/start_linux.sh &'
  37. //sh 'cd target/o2server'
  38. sh 'pwd'
  39. sh 'JENKINS_NODE_COOKIE=dontKillMe nohup target/o2server/start_linux.sh > nohup.out &'
  40. }
  41. }
  42. }
  43. }