Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

65 rindas
2.1KB

  1. #!/bin/bash
  2. mvn clean
  3. mvn package -Dmaven.test.skip=true
  4. #image_version=$(date +%Y%m%d%H%M)
  5. image_version=$version
  6. docker cp docker_jenkins:/var/jenkins_home/workspace/BeidouAstPos/target/beidouast.jar /usr/local/beidou_ast/beidouast.jar
  7. #docker stop dipperposition_service || true
  8. #docker rm dipperposition_service || true
  9. # 删除镜像
  10. #docker rmi -f $(docker images | grep telpo/dipperposition_service | awk '{print $3}')
  11. #docker build . -t telpo/dipperposition_service:$image_version
  12. #TODO:推送镜像到私有仓库
  13. #echo '=================开始推送镜像======================='
  14. #docker tag telpo/dipperposition_service:$image_version 139.224.254.18:5000/dipperposition_service:$image_version
  15. #docker push 139.224.254.18:5000/dipperposition_service:$image_version
  16. #echo '=================推送镜像完成======================='
  17. #删除产生的None镜像
  18. #docker rmi -f $(docker images | grep none | awk '{print $3}')
  19. # 查看镜像列表
  20. #docker images
  21. # 启动容器
  22. #docker run -v /home/data/dipperposition/log:/var/log/dipperposition -d -e active=dev --network host --restart=always
  23. # -p 9011:9011 -p 9012:9012 -p 9013:9013 --name dipperposition_service 139.224.254.18:5000/dipperposition_service:$image_version
  24. #echo "scp ${WORKSPACE} files......begin"
  25. #set passwd "telpo#1234"
  26. #scp /var/jenkins_home/workspace/dipperpos_service/target/dipperposition.jar root@47.116.142.20:/home/data/dipperposition/dipperposition.jar
  27. #expect {
  28. # "密码:"
  29. # {
  30. # send "$passwd\n"
  31. # }
  32. # "pass"
  33. # {
  34. # send "$passwd\n"
  35. # }
  36. #
  37. # "yes/no"
  38. # {
  39. # sleep 5
  40. # send_user "send yes"
  41. # send "yes\n"
  42. # }
  43. # eof
  44. # {
  45. # sleep 5
  46. # send_user "eof\n"
  47. # }
  48. #}
  49. #send "exit\r"
  50. #expect eof
  51. #echo "scp ${WORKSPACE} files......end"
  52. # 查看日志
  53. # docker logs dipperposition_service
  54. echo '=================启动NettyAPP======================='
  55. ps -ef |grep beidou |awk '{print $2}'|xargs kill -9
  56. java -jar -Xms256m -Xmx256m -Xss256k -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m /usr/local/beidou_ast/beidouast.jar --spring.profiles.active=dev
  57. echo '=================完成NettyAPP启动======================='