05api-prod.groovy 758 B

12345678910111213141516171819202122232425262728293031
  1. //file:noinspection ALL
  2. pipeline {
  3. agent any
  4. environment {
  5. projectName = 'wms8-api'
  6. }
  7. stages {
  8. stage('#检查环境') {
  9. steps {
  10. sh """
  11. java -version
  12. gradle -v
  13. """
  14. }
  15. }
  16. stage('#编译项目') {
  17. steps {
  18. sh """
  19. wget -N http://git.yvanui.com/lizhiwei/jztd-deploy/raw/master/05shengke/05api-prod.sh
  20. chmod +x ./05api-prod.sh
  21. ./05api-prod.sh deploy
  22. sleep 5s
  23. """
  24. sh "JENKINS_NODE_COOKIE=dontKillMe nohup ./05api-prod.sh restart > /dev/null 2>&1 &"
  25. }
  26. }
  27. }
  28. }