.drone-bak.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. kind: pipeline
  2. type: docker
  3. name: test
  4. steps:
  5. - name: build
  6. image: plugins/docker
  7. volumes:
  8. - name: hosts
  9. path: /etc/hosts
  10. - name: docker-ca
  11. path: /etc/docker
  12. - name: docker-sock
  13. path: /var/run/docker.sock
  14. settings:
  15. dockerfile: /drone/src/Dockerfile
  16. username:
  17. from_secret: aliyun_name
  18. password:
  19. from_secret: aliyun_password
  20. repo: registry.cn-hangzhou.aliyuncs.com/kpt-event/kpt-tmr-sheep
  21. registry: registry.cn-hangzhou.aliyuncs.com
  22. tags: [test]
  23. - name: ssh commands
  24. image: appleboy/drone-ssh
  25. settings:
  26. host: 192.168.1.70
  27. username: tmrwatch
  28. password:
  29. from_secret: ssh_password
  30. port: 22
  31. script:
  32. - cd /data/docker-compose/kpt-tmr-sheep/
  33. - echo "123456" | ./restart.sh
  34. trigger:
  35. branch:
  36. include:
  37. - feature/*
  38. event:
  39. include:
  40. - push
  41. volumes:
  42. - name: host
  43. host:
  44. path: /etc/host
  45. - name: docker-ca
  46. host:
  47. path: /ect/docker
  48. - name: docker-sock
  49. host:
  50. path: /var/run/docker.sock