2019-07-08 08:50:38 +00:00
|
|
|
# Webhooks administration **(CORE ONLY)**
|
2014-05-27 12:12:15 +00:00
|
|
|
|
2019-08-22 08:50:31 +00:00
|
|
|
## Add a webhook for **ALL** projects
|
2013-06-05 14:32:22 +00:00
|
|
|
|
2019-07-01 03:36:23 +00:00
|
|
|
```sh
|
2019-07-01 04:24:02 +00:00
|
|
|
# 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
|
2019-07-01 03:36:23 +00:00
|
|
|
```
|
2013-06-05 14:32:22 +00:00
|
|
|
|
2019-08-22 08:50:31 +00:00
|
|
|
## Add a webhook for projects in a given **NAMESPACE**
|
2013-06-05 14:32:22 +00:00
|
|
|
|
2019-07-01 03:36:23 +00:00
|
|
|
```sh
|
2019-07-01 04:24:02 +00:00
|
|
|
# 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
|
2019-07-01 03:36:23 +00:00
|
|
|
```
|
2013-06-05 14:32:22 +00:00
|
|
|
|
2019-08-22 08:50:31 +00:00
|
|
|
## Remove a webhook from **ALL** projects using
|
2013-06-05 14:32:22 +00:00
|
|
|
|
2019-07-01 03:36:23 +00:00
|
|
|
```sh
|
2019-07-01 04:24:02 +00:00
|
|
|
# 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
|
2019-07-01 03:36:23 +00:00
|
|
|
```
|
2013-06-05 14:32:22 +00:00
|
|
|
|
2019-08-22 08:50:31 +00:00
|
|
|
## Remove a webhook from projects in a given **NAMESPACE**
|
2013-06-05 14:32:22 +00:00
|
|
|
|
2019-07-01 03:36:23 +00:00
|
|
|
```sh
|
2019-07-01 04:24:02 +00:00
|
|
|
# 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
|
2019-07-01 03:36:23 +00:00
|
|
|
```
|
2013-06-05 14:32:22 +00:00
|
|
|
|
2019-08-22 08:50:31 +00:00
|
|
|
## List **ALL** webhooks
|
2013-06-05 14:32:22 +00:00
|
|
|
|
2019-07-01 03:36:23 +00:00
|
|
|
```sh
|
2019-07-01 04:24:02 +00:00
|
|
|
# omnibus-gitlab
|
|
|
|
sudo gitlab-rake gitlab:web_hook:list
|
|
|
|
# source installations
|
|
|
|
bundle exec rake gitlab:web_hook:list RAILS_ENV=production
|
2019-07-01 03:36:23 +00:00
|
|
|
```
|
2013-06-05 14:32:22 +00:00
|
|
|
|
2019-08-22 08:50:31 +00:00
|
|
|
## List the webhooks from projects in a given **NAMESPACE**
|
2013-06-05 14:32:22 +00:00
|
|
|
|
2019-07-01 03:36:23 +00:00
|
|
|
```sh
|
2019-07-01 04:24:02 +00:00
|
|
|
# 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-08-08 16:54:52 +00:00
|
|
|
|
|
|
|
## Local requests in webhooks
|
|
|
|
|
|
|
|
[Requests to local network by webhooks](../security/webhooks.md) can be allowed
|
|
|
|
or blocked by an administrator.
|