You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

53 lines
1.2 KiB

  1. ---
  2. kind: pipeline
  3. type: docker
  4. name: default
  5. steps:
  6. - name: build
  7. image: docker:dind
  8. volumes:
  9. - name: dockersock
  10. path: /var/run/docker.sock
  11. - name: dockerconfig
  12. path: /root/.docker
  13. commands:
  14. - docker build -t harbor.picaiba.com/kszny/mes-ui:1.0.0-india ./ && docker push harbor.picaiba.com/kszny/mes-ui:1.0.0-india
  15. - name: deploy
  16. image: harbor.picaiba.com/tools/kubectl:1.19.8
  17. commands:
  18. - echo "172.27.0.20 lb.kubesphere.local" >> /etc/hosts
  19. #- echo "52.74.223.119 github.com" >> /etc/hosts
  20. - sleep 1
  21. - kubectl scale --replicas=0 deployment/mes-ui -n mes-india
  22. - sleep 3
  23. - kubectl scale --replicas=1 deployment/mes-ui -n mes-india
  24. depends_on:
  25. - build
  26. - name: notification
  27. image: lddsb/drone-dingtalk-message
  28. settings:
  29. token: 37a6483274f6de648a26d6710e4d8160eb7d471752abb2d70f8b7958af58fe11
  30. type: markdown
  31. secret: SEC83b10f5fefd6127e4073360d4447bb7276a90386aeee1275b2797dd377a903e7
  32. tpl: http://res.picaiba.com/msg/msg.md
  33. tips_title: 你有新消息
  34. success_color: 008800
  35. failure_color: FF0000
  36. volumes:
  37. - name: dockersock
  38. host:
  39. path: /var/run/docker.sock
  40. - name: dockerconfig
  41. host:
  42. path: /root/.docker
  43. trigger:
  44. branch:
  45. - develop
  46. event:
  47. - push