北斗定位
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

65 行
2.0KB

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