1 Star 0 Fork 10

殪曲折扇情 / gitlab-wxwork-robot

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Gitlab通知机器人

Gitlabpushtag pushmerge requestpipeline推送到企业微信的机器人。

具体见下图:

Gitlab push 代码推送

alt gitlab-push-msg-1

Gitlab push 新建分支

alt gitlab-push-msg-2

Gitlab push 删除分支

alt gitlab-push-msg-3

Gitlab push tag 推标签

alt gitlab-push-tag-msg-1

Gitlab merge request 合并请求

alt gitlab-mr-msg-1

Gitlab pipeline 流水线

alt gitlab-pipeline-msg

与企业微信对接

如何添加群机器人可自行百度。企业微信群机器人配置说明

应用部署运行

应用通过环境变量添加机器人webhook地址,WEBHOOK_URL_作为前缀,后面可接不同的推送组。使用推送组可以将消息推送到不同的群组机器人。

如环境变量WEBHOOK_URL_PROJPROJ则为推送组。推送组用于与Gitlab的集成时使用。

例如:

则环境变量设为:

WEBHOOK_URL_PROJ=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=ABCDEFG

多个项目示例:

WEBHOOK_URL_PROJ1=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=ABCDEFG
WEBHOOK_URL_PROJ2=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=HIJKLMN

一个应用可以添加多个推送组。

使用Docker部署

修改docker-compose.yml文件中的WEBHOOK_URL环境变量,添加企业微信机器人webhook地址。

docker-compose up -d

通过:7001端口访问服务。

直接运行

首先系统安装了node运行环境。

WEBHOOK_URL_PROJ=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=ABCDEFG npm start

通过:7001端口访问服务。

与Gitlab集成

进到项目,settings => integrations

URL填写服务的地址和端口号+推送组。

例如,服务器地址为:https://192.168.100.100:7001,推送组为PROJ。

URL填写:https://192.168.100.100:7001/proj (不区分大小写)

具体设置,参见下图:

alt gitlab集成图片

Docker Hub 地址

https://hub.docker.com/repository/docker/mingyanggroup/gitlab-wxwork-robot

MIT License Copyright (c) 2020-2021 名洋集团 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

集成Gitlab、Jenkins和企业微信。提升DevOps沟通效率。 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/Bigdata_2013_admin/gitlab-wxwork-robot.git
git@gitee.com:Bigdata_2013_admin/gitlab-wxwork-robot.git
Bigdata_2013_admin
gitlab-wxwork-robot
gitlab-wxwork-robot
master

搜索帮助