All Projects → NetEaseGame → Git Webhook

NetEaseGame / Git Webhook

Licence: mit
使用 Python Flask + SQLAchemy + Celery + Redis + React 开发的用于迅速搭建并使用 WebHook 进行自动化部署和运维,支持 Github / GitLab / Gogs / GitOsc。

Programming Languages

python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects
Makefile
30231 projects

Projects that are alternatives of or similar to Git Webhook

Gigrator
Git repos migration tool which supports Github / Gitee / Gitlab / Gitea / Coding / Gogs / 腾讯工蜂.
Stars: ✭ 34 (-97.64%)
Mutual labels:  gitlab, gogs
plugin-gitlab-webhook
[NOT MAINTAINED] Gitlab Webhook Plugin for Kanboard
Stars: ✭ 31 (-97.85%)
Mutual labels:  gitlab, webhook
pm2-githook
receive webhook from github/gitlab and ask pm2 to reload the application for you
Stars: ✭ 39 (-97.29%)
Mutual labels:  gitlab, webhook
epf-transmitter
astrizhachuk.github.io/epf-transmitter/
Stars: ✭ 32 (-97.78%)
Mutual labels:  gitlab, webhook
Skyhook
Parses webhooks and forwards them in the proper format to Discord.
Stars: ✭ 263 (-81.72%)
Mutual labels:  webhook, gitlab
froggit-go
Froggit-Go is a universal Go library, allowing to perform actions on VCS providers.
Stars: ✭ 19 (-98.68%)
Mutual labels:  gitlab, webhook
gogs-bash
Bash Script for Interacting with the GOGS API
Stars: ✭ 31 (-97.85%)
Mutual labels:  webhook, gogs
Git Auto Deploy
Deploy your GitHub, GitLab or Bitbucket projects automatically on Git push events or web hooks
Stars: ✭ 251 (-82.56%)
Mutual labels:  webhook, gitlab
go-scm
Package scm provides a unified interface to multiple source code management systems.
Stars: ✭ 117 (-91.87%)
Mutual labels:  gitlab, gogs
Discord-GitLab-Webhook
A Discord bot for using webhooks with GitLab (and extendable for other custom webhooks not yet built into Discord).
Stars: ✭ 35 (-97.57%)
Mutual labels:  gitlab, webhook
plugin-gogs-webhook
[NOT MAINTAINED] Plugin to handle Gogs Webhooks
Stars: ✭ 29 (-97.98%)
Mutual labels:  webhook, gogs
Git Deploy
Php Script for Auto-Pull in server (Using WebHook from GitLab, GitHub and Bitbucket)
Stars: ✭ 495 (-65.6%)
Mutual labels:  webhook, gitlab
MigrateGitlabToGogs
Migrate repositories from Gitlab to Gogs or Gitea
Stars: ✭ 49 (-96.59%)
Mutual labels:  gitlab, gogs
gogs-webhook-plugin
Jenkins Gogs Webhook
Stars: ✭ 76 (-94.72%)
Mutual labels:  webhook, gogs
YappyGitLab
A GitLab monitor bot for Discord
Stars: ✭ 51 (-96.46%)
Mutual labels:  gitlab, webhook
rocketchat-gitlab-hook
Add GitLab notifications via a new WebHook in Rocket.Chat
Stars: ✭ 80 (-94.44%)
Mutual labels:  gitlab, webhook
Go Git Webhook
Golang 实现的自动化部署和运维工具,支持:Github / GitLab / GitOsc。
Stars: ✭ 173 (-87.98%)
Mutual labels:  webhook, gitlab
Webhookit
Simple git webhook cli tool for automation tasks, bind git webhook to action.
Stars: ✭ 177 (-87.7%)
Mutual labels:  webhook, gitlab
gitlab-ci-discord-webhook
⛓ Here's your serverless solution for sending build status from GitLab CI to Discord as webhooks.
Stars: ✭ 32 (-97.78%)
Mutual labels:  gitlab, webhook
Generic Webhook Trigger Plugin
Can receive any HTTP request, extract any values from JSON or XML and trigger a job with those values available as variables. Works with GitHub, GitLab, Bitbucket, Jira and many more.
Stars: ✭ 287 (-80.06%)
Mutual labels:  webhook, gitlab

Git WebHook

一个使用 Python Flask + SQLAchemy + Celery + Redis + React 开发的用于迅速搭建并使用 WebHook 进行自动化部署和运维系统,支持:Github / GitLab / Gogs / GitOsc

**若觉得 git-webhook 部署依然比较复杂,可以尝试更为简洁的 cli 版本:webhookit。**在线实例可以查看这里

Latest Stable Version Build Status Codecov branch GitHub GitLab GitOsc Gogs

  • 技术栈简单,部署容易;
  • 代码简洁易懂,二次开发毫无压力;
  • 支持 Github / GitLab / Gogs / GitOsc
  • 使用 SSH 方式,支持多服务配置;

Project ChangeLog | Online DEMO Website(使用 nginx 部署绑定域名)

一、如何使用 & 部署 ?

习惯使用 Docker 的老司机直接看如何使用 Docker 部署 Git-WebHook

  1. 安装 git-webhook:

    pip install git-webhook

    备注:项目中某一个依赖库需要安装 python-dev

  2. 创建配置

    gitwebhook config

    命令执行之后,会在对应用户目录生成新的配置文件,然后对应修改配置文件内容。主要需要配置三点:

    • DATABASE_URI: 数据库地址,理论上可以使用任何关系数据库;推荐使用 sqlite 和 mysql (经过测试);
    • CELERY REDIS: Redis URI 配置,主要用于 Celery 后台任务;
    • GITHUB: GitHub 登陆配置,可以到 OAuth applications 自行申请,登陆 Callback 地址为: your_domain/github/callback.
  3. 初始化数据库结构

    gitwebhook createdb
  4. 运行应用

    # 1. run python webserver
    gitwebhook runserver
    # 2. run celery async task
    gitwebhook celery

    运行之后,打开 http://127.0.0.1:18340 (一巴扇死你)即可访问。使用 GitHub 账号登陆。

  5. 添加WebHook

    在工具中添加 WebHook 项目,获得 WebHook URL,并填写到 Github / GitLab / OscGit 的 WebHook 配置中。

**安装之后如何使用?**直接看你部署的 Web 应用文档吧,或者在这里也可以看到。

三、效果预览

  • 首页

index.png

  • WebHook列表

webhook.png

  • 服务器列表

server.png

  • WebHook 历史记录

history.png

四、部署

代码使用 Flask 框架开发,gitwebhook runserver 运行可以用于线上生产环境,可以额外使用 nginx 做负载均衡和域名绑定。

主要的服务器依赖环境:

  • 数据库环境(自行选择,推荐 mysql 和 sqlite);
  • Redis,利用 Celery 做后台任务;

备注:如果使用 gunicorn 部署, worker 数量必须为 1,建议 worker 类型为 eventlet (gunicorn -k eventlet -w 1),并且 nginx 负载均衡的时候,需要使用 ip_hash 算法。 具体请参考: gunicorn-web-server

当然也可以直接使用 Docker 部署

五、贡献

项目使用 SSH 私钥 / 账户密码的方式,直接登陆 Linux 服务器,执行部署或者运维的 Shell 命令,安全可靠,当然因为涉及到私钥,或者用户密码,所以为了安全起见,建议在内网搭建使用(这些是我们的使用情景)。

后端开发使用:Python Flask + SQLAchemy + Celery + Redis,常规的技术栈;

前端开发使用 React + Webpack,并没有使用其他消息通信框架。

所以整体项目代码非常简单,大部分都能够修改和更新代码,并提交 Pull Request,目前系统 TODO 包括,我个人也将注意完善:

  • Celery 进程情况显示(当 Celery 进程没有执行的时候,在页面上提示,类似于 Sentry);
  • 系统状态和统计(任务队列实时情况,WebHook 执行的统计图表等);

LICENSE

MIT @hustcc

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].