Features:
- HTTP POST API for gitlab webhook
- mirrors selected repository branches under defined user
- logs to Syslog
Install (using RVM):
- create user to containt RVM and the project
- install RVM for the user
- clone this repo into his homedir
- run
bundle install
Configure:
- copy
gitlabitch.yaml.example
to/etc/gitlabitch.yaml
and edit it accordingly. rvmsudo rackup -E production -D
(the user with RVM must be able to runrvmsudo
, see RVM docs)- the configured user must exist and it needs to have write permissions to the basedir; also, the user needs to have ssh keys generated (usually in
~/.ssh/
) - add the SSH pubkey to the desired repo in GitLab (in section Settings -> Deploy keys)
- add the commit hook URL:
http://<server_with_gitlabitch>:9292/<project_name>
- click test
- the branch should be mirrored to the desired directory
- you can what's been done in syslog (daemon, INFO)
TODO:
- upstart scripts