feat: 1
This commit is contained in:
44
.drone.yml
44
.drone.yml
@@ -61,19 +61,41 @@ steps:
|
||||
{
|
||||
"msgtype": "markdown",
|
||||
"markdown": {
|
||||
"content": "{{#success build.status}}<font color=\"green\">✅ 构建成功</font>{{else}}<font color=\"red\">❌ 构建失败</font>{{/success}}\n\n
|
||||
📦 项目: {{repo.owner}}/{{repo.name}} \n
|
||||
🔢 构建号: #{{build.number}} \n
|
||||
🌿 分支: <font color=\"comment\">{{build.branch}}</font> \n
|
||||
🆔 提交标识: `{{build.commit}}` \n
|
||||
👤 提交者: {{build.author}} \n
|
||||
📝 提交信息: {{build.message}} \n
|
||||
⏱️ 持续时间: {{build.duration}}秒 \n\n
|
||||
{{^success build.status}}📜 失败日志: [点击查看]({{build.link}}/logs) \n{{/success}}
|
||||
[📊 查看详情]({{build.link}})"
|
||||
"content": "{{#success build.status}}<font color=\"green\">✅ 构建成功</font>{{else}}<font color=\"red\">❌ 构建失败</font>{{/success}}
|
||||
>📦 项目: {{repo.owner}}/{{repo.name}}
|
||||
>🔢 构建号: #{{build.number}}
|
||||
>🌿 分支: <font color=\"comment\">{{build.branch}}</font>
|
||||
>👤 提交者: {{build.author}}
|
||||
>📝 提交信息: {{build.message}}
|
||||
>⏱️ 持续时间: {{build.duration}}秒
|
||||
>{{^success build.status}}📜 失败日志: [点击查看]({{build.link}}/logs) \n{{/success}}
|
||||
>[📊 查看详情]({{build.link}})"
|
||||
}
|
||||
}
|
||||
- name: notify
|
||||
image: 10.7.127.190:38080/plugins/webhook:latest
|
||||
environment:
|
||||
WEBHOOK_URL:
|
||||
from_secret: wechat_webhook_url
|
||||
when:
|
||||
status: [ success,failure ]
|
||||
settings:
|
||||
urls: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=f2b3fcbc-e70f-4826-8b08-340518b3a96f
|
||||
content_type: application/json
|
||||
template: |
|
||||
{
|
||||
"msgtype": "markdown",
|
||||
"markdown": {
|
||||
"content": "{{#success build.status}}✅{{else}}❌{{/success}}**{{ repo.owner }}/{{ repo.name }}** (Build #{{build.number}})\n
|
||||
>**构建结果**: {{ build.status }}
|
||||
>**构建详情**: [点击查看]({{ build.link }})
|
||||
>**代码分支**: {{ build.branch }}
|
||||
>**提交标识**: {{ build.commit }}
|
||||
>**提交发起**: {{ build.author }}
|
||||
>**提交信息**: {{ build.message }}
|
||||
"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user