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