debian-mirror-gitlab/doc/raketasks/web_hooks.md

61 lines
1.6 KiB
Markdown
Raw Normal View History

2019-09-30 21:07:59 +05:30
# Webhooks administration **(CORE ONLY)**
2014-09-02 18:07:02 +05:30
2019-12-04 20:38:33 +05:30
## Add a webhook for **ALL** projects
2014-09-02 18:07:02 +05:30
2019-09-30 21:07:59 +05:30
```sh
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook"
# source installations
bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" RAILS_ENV=production
```
2014-09-02 18:07:02 +05:30
2019-12-04 20:38:33 +05:30
## Add a webhook for projects in a given **NAMESPACE**
2014-09-02 18:07:02 +05:30
2019-09-30 21:07:59 +05:30
```sh
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=acme
# source installations
bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=acme RAILS_ENV=production
```
2014-09-02 18:07:02 +05:30
2019-12-04 20:38:33 +05:30
## Remove a webhook from **ALL** projects using
2014-09-02 18:07:02 +05:30
2019-09-30 21:07:59 +05:30
```sh
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook"
# source installations
bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" RAILS_ENV=production
```
2014-09-02 18:07:02 +05:30
2019-12-04 20:38:33 +05:30
## Remove a webhook from projects in a given **NAMESPACE**
2014-09-02 18:07:02 +05:30
2019-09-30 21:07:59 +05:30
```sh
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=acme
# source installations
bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=acme RAILS_ENV=production
```
2014-09-02 18:07:02 +05:30
2019-12-04 20:38:33 +05:30
## List **ALL** webhooks
2014-09-02 18:07:02 +05:30
2019-09-30 21:07:59 +05:30
```sh
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:list
# source installations
bundle exec rake gitlab:web_hook:list RAILS_ENV=production
```
2014-09-02 18:07:02 +05:30
2019-12-04 20:38:33 +05:30
## List the webhooks from projects in a given **NAMESPACE**
2014-09-02 18:07:02 +05:30
2019-09-30 21:07:59 +05:30
```sh
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:list NAMESPACE=acme
# source installations
bundle exec rake gitlab:web_hook:list NAMESPACE=acme RAILS_ENV=production
```
2019-10-12 21:52:04 +05:30
## Local requests in webhooks
[Requests to local network by webhooks](../security/webhooks.md) can be allowed
or blocked by an administrator.