Jenkinsfile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. sh 'npm run clear'
  12. }
  13. }
  14. stage('build') {
  15. parallel {
  16. stage('build server') {
  17. steps {
  18. sh 'id'
  19. sh 'npm run build_server'
  20. }
  21. }
  22. stage('build web') {
  23. steps {
  24. sh 'npm run build_web'
  25. }
  26. }
  27. }
  28. }
  29. stage('deploy') {
  30. steps {
  31. sh 'npm run deploy:linux'
  32. sh 'chmod 777 target/o2server/*.sh'
  33. }
  34. }
  35. stage('run') {
  36. steps {
  37. sh 'JENKINS_NODE_COOKIE=dontKillMe nohup target/o2server/start_linux.sh > nohup.out &'
  38. }
  39. }
  40. }
  41. }