BigW Consortium Gitlab

web_hooks.md 1.55 KB
Newer Older
1 2
# Web hooks

3
## Add a web hook for **ALL** projects:
4

5 6
    # omnibus-gitlab
    sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook"
7
    # source installations
8
    bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" RAILS_ENV=production
9

10
## Add a web hook for projects in a given **NAMESPACE**:
11

12 13
    # omnibus-gitlab
    sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=acme
14
    # source installations
15
    bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=acme RAILS_ENV=production
16

17
## Remove a web hook from **ALL** projects using:
18

19 20
    # omnibus-gitlab
    sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook"
21
    # source installations
22
    bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" RAILS_ENV=production
23

24
## Remove a web hook from projects in a given **NAMESPACE**:
25

26 27
    # omnibus-gitlab
    sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=acme
28
    # source installations
29
    bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=acme RAILS_ENV=production
30

31
## List **ALL** web hooks:
32

33 34
    # omnibus-gitlab
    sudo gitlab-rake gitlab:web_hook:list
35
    # source installations
36
    bundle exec rake gitlab:web_hook:list RAILS_ENV=production
37

38
## List the web hooks from projects in a given **NAMESPACE**:
39

40 41
    # omnibus-gitlab
    sudo gitlab-rake gitlab:web_hook:list NAMESPACE=/
42
    # source installations
43
    bundle exec rake gitlab:web_hook:list NAMESPACE=/ RAILS_ENV=production
44 45

> Note: `/` is the global namespace.