Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Gitlab Cookbook

You're reading from   Gitlab Cookbook Over 60 hands-on recipes to efficiently self-host your own Git repository using GitLab

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher
ISBN-13 9781783986842
Length 172 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Jeroen van Baarsen Jeroen van Baarsen
Author Profile Icon Jeroen van Baarsen
Jeroen van Baarsen
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Introduction and Installation 2. Explaining Git FREE CHAPTER 3. Managing Users, Groups, and Permissions 4. Issue Tracker and Wiki 5. Maintaining Your GitLab Instance 6. Webhooks, External Services, and the API 7. Using LDAP and OmniAuth Providers 8. GitLab CI A. Tips and Tricks Index

Using system hooks


When you create or delete a user or project, you might want to be notified, or you might have a backend system from which you want to receive notifications for this type of events. GitLab has support for this in the form of system hooks. In this recipe, we take a look at how you can set up system hooks for your GitLab instance.

The following events can trigger a system webhook call:

  • Project created

  • Project destroyed

  • New team member

  • The team member is removed

  • A user is created

  • The user is removed

How to do it…

In the following steps, we will set up the system hooks:

  1. Log in to GitLab as an administrator.

  2. Go to the Admin area section.

  3. Click on Hooks.

  4. As we want to have a place to test the webhook without having to create a lot of software for it, we are going to use a service called RequestBin. Go to http://requestb.in and click on Create a RequestBin.

  5. Copy the URL that is given on that page, and paste it to GitLab in the hook's URL field.

  6. When you click on Add System Hook, the hook will...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $24.99/month. Cancel anytime