Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liou666/webhook
🤖️ 基于gitlab webhook的自动部署服务
https://github.com/liou666/webhook
Last synced: 3 days ago
JSON representation
🤖️ 基于gitlab webhook的自动部署服务
- Host: GitHub
- URL: https://github.com/liou666/webhook
- Owner: liou666
- Created: 2022-01-11T03:24:51.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-11T06:02:09.000Z (almost 3 years ago)
- Last Synced: 2024-03-08T05:29:07.743Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
### 基于webhook的自动化部署服务
> 服务器需要配置git,node,docker环境,并且需要配置ssh密钥
+ webhook配置
`webhook url`上目前需加上**branch** `params` http://localhost:8000?branch=master
+ 项目启动
```shell
git clone https://github.com/liou666/webhook.git
cd webhook/web
node app.js
```+ 项目基础配置
```js
// config/constant.jsconst GIT_PROJECT_NAME="xxx"; //git项目名称
const GIT_ADDRESS="[email protected]:xxx/xxx.git";//git 仓库地址
const PORT=xxx ;//node服务启动端口
const GITLABEL_TOKEN="xxx"//webhook的tokenmodule.exports={
GIT_PROJECT_NAME,
GIT_ADDRESS,
PORT,
GITLABEL_TOKEN
}```
```js
// config/index.js//branch对应git仓库的分支名,port对应docker容器映射到本地的端口
module.exports=[{
branch:"master",
port:80
},
{
branch:"test",
port:81
}]```