.drone.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. pipeline:
  2. notify_begin_slack:
  3. image: plugins/slack
  4. webhook: https://hooks.slack.com/services/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
  5. channel: general
  6. username: drone-bot
  7. template: "<{{build.link}}|Deployment #{{build.number}} started> on <http://tyn.ar3qvx.com:3000/{{repo.owner}}/{{repo.name}}/tree/{{build.branch}}|{{repo.name}}:{{build.branch}}> by: {{build.author}}"
  8. when:
  9. branch: [ master, staging ]
  10. # drone deploy octocat/hello-world 24 staging
  11. push_image_to_test_registry:
  12. image: plugins/docker
  13. registry: tyn.ar3qvx.com
  14. repo: tyn.ar3qvx.com/tmp/dongcj_test
  15. docker_image: dongcj/centos7
  16. tags: latest
  17. # Manage Secrets.
  18. secrets: [ docker_username, docker_password ]
  19. # for rancher
  20. publish_to_test_env:
  21. image: peloton/drone-rancher
  22. url: http://tyn.ar3qvx.com:8080
  23. access_key: 936F7879DDC49BFC5EFC
  24. secret_key: gM9Ncq8yX4R4f1nea6SLNqM49Rvpd4yu8m5TbfeL
  25. service: testdrone/testservice
  26. docker_image: dongcj/centos7
  27. start_first: false
  28. confirm: true
  29. timeout: 240
  30. batch_size: 5
  31. test_stage:
  32. image: dongcj/webshell
  33. confirm: true
  34. timeout: 240
  35. commands:
  36. - sleep 20
  37. notify_test_stage:
  38. image: plugins/slack
  39. webhook: https://hooks.slack.com/services/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
  40. channel: general
  41. username: drone-bot
  42. when:
  43. branch: [ master, staging ]
  44. status: [ success ]
  45. template: "<{{build.link}}|Deployment #{{build.number}} success> on <http://http://tyn.ar3qvx.com:3000/{{repo.owner}}/{{repo.name}}/tree/{{build.branch}}|{{repo.name}}:{{build.branch}}> by: {{build.author}}"
  46. notify_end_slack:
  47. image: plugins/slack
  48. webhook: https://hooks.slack.com/services/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
  49. channel: general
  50. username: drone-bot
  51. when:
  52. branch: [ master, staging ]
  53. status: [ success, failure ]
  54. template: "<{{build.link}}|Deployment #{{build.number}} stop> on <http://http://tyn.ar3qvx.com:3000/{{repo.owner}}/{{repo.name}}/tree/{{build.branch}}|{{repo.name}}:{{build.branch}}> by: {{build.author}}"
  55. notify_end_email:
  56. image: drillster/drone-email
  57. host: smtp.mxhichina.com
  58. skip_verify: false
  59. username: admin@dongcj.com
  60. password: Dcj85509336
  61. from: drone@svicloud.com
  62. recipients: [ dongchaojun@svi-tech.com.cn, admin@svicloud.com ]
  63. recipients_only: false
  64. when:
  65. status: [ changed, failure ]