编程语言/Drone/通知集成:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
创建页面,内容为“== 标题文本 == <syntaxhighlight lang="yaml"> - name: notify-slack image: plugins/slack settings: webhook: https://hooks.slack.com/... template: > 项目 ${DRONE_REPO} 构建 ${DRONE_BUILD_STATUS} 详情: ${DRONE_BUILD_LINK}</syntaxhighlight>”
 
Kangkk​(留言 | 贡献)
 
(未显示同一用户的1个中间版本)
第8行: 第8行:
       项目 ${DRONE_REPO} 构建 ${DRONE_BUILD_STATUS}  
       项目 ${DRONE_REPO} 构建 ${DRONE_BUILD_STATUS}  
       详情: ${DRONE_BUILD_LINK}</syntaxhighlight>
       详情: ${DRONE_BUILD_LINK}</syntaxhighlight>
<syntaxhighlight lang="yaml">
- 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]</syntaxhighlight>
== 标题文本 ==
=== 标题文本 ===
<syntaxhighlight lang="yaml">
  - 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]</syntaxhighlight>

2026年3月18日 (三) 09:24的最新版本

标题文本

- 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]