Jenkinsfile 1.1 KB

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