.drone.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. kind: pipeline
  2. type: docker
  3. name: kptTmrGroup
  4. clone:
  5. depth: 1
  6. disable: true
  7. steps:
  8. - name: clone
  9. image: alpine/git
  10. commands:
  11. - git clone -b develop http://kpt.kptyun.cn:3000/xuyiping/kpt-tmr-group.git
  12. - name: build
  13. image: plugins/docker
  14. volumes:
  15. - name: hosts
  16. path: /etc/hosts
  17. - name: docker-ca
  18. path: /etc/docker
  19. - name: dockersock
  20. path: /var/run/docker.sock
  21. settings:
  22. dockerfile: /drone/src/kpt-tmr-group/Dockerfile
  23. username:
  24. from_secret: aliyuncs_username
  25. password:
  26. from_secret: aliyuncs_password
  27. repo: registry.cn-hangzhou.aliyuncs.com/kpt-event/kpt-tmr-group
  28. registry: registry.cn-hangzhou.aliyuncs.com
  29. tags: [ 1.0.0,latest ]
  30. - name: remove-local-image
  31. image: appleboy/drone-ssh
  32. settings:
  33. host: 192.168.1.70
  34. username: tmrwatch
  35. password:
  36. from_secret: tmrwatch_password
  37. port: 22
  38. script:
  39. - docker rm registry.cn-hangzhou.aliyuncs.com/kpt-event/kpt-tmr-group:1.0.0
  40. trigger:
  41. branch:
  42. include:
  43. - develop
  44. event:
  45. include:
  46. - push
  47. volumes:
  48. - name: docker-ca
  49. host:
  50. path: /etc/docker
  51. - name: dockersock
  52. host:
  53. path: /var/run/docker.sock