feat: 构建结果群群机器人通知

This commit is contained in:
2025-04-13 13:53:13 +08:00
parent 23d246fc20
commit 6aa7f28873
4 changed files with 32 additions and 8 deletions

View File

@@ -45,7 +45,29 @@ steps:
path: /app/config
commands:
- kubectl apply -f deployment.yml -n metis --kubeconfig=/app/config/base-taishan-kubectl.yml
-
- name: notify
image: plugins/webhook
environment:
WEBHOOK_URL:
from_secret: wechat_webhook_url
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:
- name: config