编程语言/Drone/通知集成

来自康健生活

标题文本

- name: notify-slack
  image: plugins/slack
  settings:
    webhook: https://hooks.slack.com/...
    template: >
      项目 ${DRONE_REPO} 构建 ${DRONE_BUILD_STATUS} 
      详情: ${DRONE_BUILD_LINK}
 - name: dingtalk-push
    image: lddsb/drone-dingtalk-message
    depends_on: [deploy]
    settings:
      token: xxxxxxxxxxxxxxxxxxxxxxxxxxx
      type: markdown
      message_pic: true
      sha_link: true
    when:
      event: [push]
      status: [success, failure]

标题文本

标题文本

  - name: notify
    image: drillster/drone-email
    settings:
      host: smtp.qq.com      # 例如 smtp.qq.com
      port: 465  #  例如QQ邮箱端口465
      username: 308711822@qq.com  # 邮箱用户名
      password: 输入你自己的啊!!!!# 邮箱密码
      subject: "Drone build: [{{ build.status }}] {{ repo.name }} ({{ repo.branch }}) #{{ build.number }}"
      from: 308711822@qq.com
      skip_verify: true
      recipients_only: true  # 只发送给指定邮件收件人,不默认发送给流水线创建人;
      recipients: [ 308711822@qq.com]
    when: # 执行条件
      status: [ changed, failure, success]