[Day 19] Mattermost - Webhooks

Mattermost Webhooks

为什麽要介绍Mattermost的Webhooks呢?因为我们之後要把Gitea+Drone+Mattermost透过webhook把整个流程串起来!因此Mattermost Webhooks在这扮演了重要的角色。

Let's try it

那大家就跟着我一步一步来吧

建立Mattermost Webhook

我们先介绍Incoming Webhooks -> 就是从外部传入Mattermost Server的Webhook

进入mattermost webhooks设定介面
https://ithelp.ithome.com.tw/upload/images/20210915/201152897z7QncjmsU.png

选择「内送Webhook」
https://ithelp.ithome.com.tw/upload/images/20210915/20115289ng4ZFeKINO.png

点击「增加内送Webhook」
https://ithelp.ithome.com.tw/upload/images/20210915/20115289sFwE7gJF0s.png

进入设定介面,填写好设定值後,点选储存
https://ithelp.ithome.com.tw/upload/images/20210915/201152892DgXrI8vIC.png

设定成功後,会出现你的「内送Webhook的URL」请将此URL复制起来,等等会用到!

https://ithelp.ithome.com.tw/upload/images/20210915/201152891HuvGku6xB.png

那麽开始用gitea带着大家试试看

Gitea SystemLog to Mattermost (需有管理员权限XD)

  • 打开gitea页面 右上角 -> 网站管理
    https://ithelp.ithome.com.tw/upload/images/20210914/20115289ftTz6uLZ8x.png

  • 点选 「系统 Webhook」-> 建立Webhook按钮 -> 选择slack
    https://ithelp.ithome.com.tw/upload/images/20210914/20115289fcwYbIe0fT.png

  • 进入设定介面
    https://ithelp.ithome.com.tw/upload/images/20210914/20115289fNZRPpjstU.png

  • 资料填写说明
    目标 URL -> 带入刚刚在Mattermost Incoming Webhook复制好的Url
    频道 -> 带入刚刚在Incoming Webhook设定的频道名称

  • 测试一下
    https://ithelp.ithome.com.tw/upload/images/20210915/20115289zjqcIukb5q.png

嘿嘿,之後只要任何人推东西上去gitea,我都可以透过此方法在mattermost的频道监控各位。

RepoLog to Mattermost

选一个专案 -> 设定 -> webhook -> 建立webhook
https://ithelp.ithome.com.tw/upload/images/20210914/20115289iNVTsKUKV6.png

到设定介面内进行设定
https://ithelp.ithome.com.tw/upload/images/20210914/20115289jOIEoNn5Uh.png

测试一下
https://ithelp.ithome.com.tw/upload/images/20210915/20115289rsKk21igD0.png

如下图之後的gitea repo可以使用webhook触发event推送讯息到mattermost上罗
https://ithelp.ithome.com.tw/upload/images/20210915/20115289fjHxa6nvbs.png

今天的webhook设定就先这样,已经可以gitea+mattermost了,大家可以试试看,之後会带着大家进一步升级成gitea+drone+mattermost~敬请期待。


<<:  Data layer testing (3)

>>:  Day13 [实作] 把视讯及音讯内容录制下来

第 10 天 别说吕布了,你听过青铜五小强吗 |Template-driven-form、ngModel、Template variables

前情提要 昨日我们聊了一些关於「页面」与「元件」在规划上,可能需要注意的地方。今天,我们会实际带着「...

25. 懒、没耐心、傲慢是工程师最好的美德

前言 这篇感觉大家都可以看看,当身为工程师的你,总是思考要怎麽利用程序帮助增加你的效率时,你可以想...

【心得】我就是要跟别人不一样!!List 清单样式变变变~

当我们看到条列式的文字时,首先都会想到使用HTML里面的<ol>、<ul>来...

我们的基因体时代-AI, Data和生物资讯 Day30-以终为始

上一篇我们的基因体时代-AI, Data和生物资讯 Day29-大数据追踪COVID病毒之演进想进一...

虚拟区域网路扩展(Virtual Extensible LAN:VXLAN)

虚拟区域网路 (VLAN) -VLAN 组(来源:Cisco Press) 虚拟 LAN (VLAN...