Coder Social home page Coder Social logo

gitlab-webhook-receiver's Introduction

Introduction

gitlab-webhook-receiver is a script to receive http posts from gitlab and then pull the latest branches from a git repo.

License

gitlab-webhook-receiver is released under the GPL v2.

Documentation

(1) Modify the script

Modify the script near the top where it looks like this:

############################################################
##### You will likely need to change some of the below #####

# log file for this script
log_file = '/var/lib/puppet/gitlab-webhook-receiver/webhook.log'

# where the puppet base git dir is
git_dir = "/etc/puppet/environments"

# the puppet master environment
git_master_dir = "/etc/puppet/environments/master"

# this is the name of the gitlab project name
git_project = "newpuppet"

# this is the git ssh account
git_ssh = "[email protected]"

log_max_size = 25165824         # 24 MB
log_level = logging.INFO
#log_level = logging.DEBUG      # DEBUG is quite verbose

##### You should stop changing things unless you know what you are doing #####
##############################################################################

update it with where your dirs live.

(2) create the gitlab webhook

In gitlab, as admin, go to "Hooks" tab, create hook as: http://your.ip.goes.here:8000

or change the port on line 175 of the script.

(3) Optional init script

Remember to edit the script if any of your directories were changed.

(4) Do initial checkout manually

Whatever your git_dir is, do the first checkout manually. The script is made to work with a pre-existing setup; and this gives you a chance to make sure your permissions/ssh keys are all setup properly.

Trouble getting it working?

Let me know what's happening and I'll try to help. Email me at [email protected].

Contributing

I'm open to any feedback / patches / suggestions.

Shawn Sterling [email protected]

gitlab-webhook-receiver's People

Contributors

csmithatsquiz avatar spikeon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.