Skip to content

spuder/r10k_gitlab_webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

r10k gitlab webhook

![Gitter](https://badges.gitter.im/Join Chat.svg)

A ruby gem that starts a webrick webservice and listens for requests. When a POST is recieved, it executes the following command

sudo r10k deploy environment -pv debug

##Usage

###Install gem

gem install r10k_gitlab_webhook

Logging

Log locations can be specified. By default they are:

/var/log/r10k_gitlab_webhook_server.log
/var/log/r10k_gitlab_webhook_access.log
/var/log/r10k_gitlab_webhook.log

Examples

####Run as root, default logging

sudo r10k_gitlab_webhook 8000

####Run as root, port 9000, no logging

sudo r10k_gitlab_webhook 9000 /dev/null

Test

You can test that the script is working by running the following:

curl -X POST http://foo.example.com:8000

You should then see output generated in the log files.

##Post-receive hook

Since gitlab doesn't use the standard git 'post-receive' hook, you instead are provided a webhook. Additional information on webhooks here: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/web_hooks/web_hooks.md

Here is an example of the webhook being used in gitlab

screenshort

Start up scripts

A few init scripts have been placed in the contrib directory

Generated using pleaserun

About

A webrick server that executes r10k deploy when called

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages