webhook-tools/scripts/notify/Readme.md
2024-09-04 16:26:39 +08:00

14 lines
No EOL
776 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 目的
jenkins通知
## 使用方法
```shell
## post可以是json格式字符串也可以是某个json文件(如: test.json)。
# 但必须包含title和message字段file字段可选带有file字段时会发送一个带有url的富文本到飞书机器人提供下载或在线查看 文件会推送到cf的r2
# titlemessage的值文本可以编码为base64也可以直接发送file必须编码为base64
# 举例如下:
# json 格式
curl -XPOST -H "Content-Type: application/json" -d "{\"title\": \"测试环境\",\"message\": \"xxx更新完成\"}" https://webhook-ops.shasoapp.com/hooks/jenkins_notify
# json文件
curl -XPOST -H "Content-Type: application/json" -d "@test.json" https://webhook-ops.shasoapp.com/hooks/jenkins_notify
```