It listens to gitlab webhook push events and run commands for repositories configured in config.js. Currently, it runs on GNU/Linux and BSD OSes only.
- nodejs >= 0.10.x
- npm >= 1.4.x
cd any-installation-dirgit clone https://github.com/liocuevas/gitlab-webhook-deployer.gitcd gitlab-webhook-deployernpm install
cp config.json.example /path/to/your/config.jsonthen set up your repositories:
{
"host" : "0.0.0.0",
"port" : 8889,
"repositories" : {
"[repository name]" : {
"name":"[my super cool name]",
"basepath" : "[path to where the command will run]",
"command" : "[the command to run]",
"branch" : "[what branch to react to]"
}
}
}
cp configDir.js.dist configDir.jsthen setup the path to your config.json file:
module.exports="/path/to/your/config.json";
node main.jsstarts the startup script manually
- Go to your git lab installation:
http://your.gitlab.domain/user/project-name/hooks - Set the webhook url:
http://your.webhook.domain:port