ci: 模板

This commit is contained in:
2025-04-26 18:40:05 +08:00
parent 8f6878a07c
commit ddb5f4e36c

View File

@@ -45,34 +45,32 @@ steps:
- name: notify - name: notify
kind: template image: 10.7.127.190:38080/plugins/webhook:latest
load: notify_template.yaml environment:
# image: 10.7.127.190:38080/plugins/webhook:latest NOTIFY_WX_URL:
# environment: from_secret: notify_wx_url
# NOTIFY_WX_URL: when:
# from_secret: notify_wx_url status: [ success,failure ]
# when: settings:
# status: [ success,failure ] urls:
# settings: from_secret: notify_wx_url
# urls: content_type: application/json
# from_secret: notify_wx_url template: |
# content_type: application/json {
# template: | "msgtype": "markdown",
# { "markdown": {
# "msgtype": "markdown", "content": "{{#success build.status}}<font color=\"green\">✅ 构建成功</font>{{else}}<font color=\"red\">❌ 构建失败</font>{{/success}}
# "markdown": { >**项目名称**: #{{ repo.name }}
# "content": "{{#success build.status}}<font color=\"green\">✅ 构建成功</font>{{else}}<font color=\"red\">❌ 构建失败</font>{{/success}} >**构建编号**: #{{build.number}}
# >**项目名称**: #{{ repo.name }} >**构建状态**: {{build.status}}
# >**构建编号**: #{{build.number}} >**代码分支**: {{build.branch}}
# >**构建状态**: {{build.status}} >**提交哈希**: {{build.commit}}
# >**代码分支**: {{build.branch}} >**提交作者**: {{build.author}}
# >**提交哈希**: {{build.commit}} >**提交信息**: {{build.message}}
# >**提交作者**: {{build.author}} >[查看构建详情]({{build.link}})
# >**提交信息**: {{build.message}} >{{^success build.status}}[查看失败日志]({{build.link}}/logs){{/success}}"
# >[查看构建详情]({{build.link}}) }
# >{{^success build.status}}[查看失败日志]({{build.link}}/logs){{/success}}" }
# }
# }
volumes: volumes: