1、介绍

git 或者说 gitlab 提供了钩子的功能,以实现基于事件的功能扩展,来满足业务上的需求。
hook 翻译为钩,钩住;web 自不必说,http万维网;
组合在一起 webhook ,即将用户的所有事件以 http 的方式发送给对应的服务,以实现功能扩展。

2、开启 webhook 功能

2.1、git 库中开启此功能
cd .git/hooks
cp commit-msg.sample commit-msg
cp post-update.sample post-update
cp update.sample update
cp pre-push.sample pre-push

cd ../../
git add .
git commit -am 'webhook'
git push origin master
2.2、gitlab 中配置 webhook
#添加时可以不用ssl证书验证

项目 -> 设置 -> webhook -> 添加webhook

#添加之后就可以进行测试了

相关文章:

  • 2021-10-28
  • 2021-09-16
  • 2022-03-04
  • 2021-06-24
  • 2022-01-16
  • 2021-06-15
  • 2021-11-27
  • 2021-10-05
猜你喜欢
  • 2022-12-23
  • 2021-04-29
  • 2022-03-05
  • 2021-11-01
  • 2022-12-23
  • 2021-04-20
  • 2021-12-15
相关资源
相似解决方案