2019-07-08 04:50:38 -04:00
|
|
|
# Webhooks administration **(CORE ONLY)**
|
2014-05-27 08:12:15 -04:00
|
|
|
|
2020-04-28 02:09:49 -04:00
|
|
|
GitLab provides Rake tasks for webhooks management.
|
|
|
|
|
|
|
|
Requests to the [local network by webhooks](../security/webhooks.md) can be allowed or blocked by an
|
|
|
|
administrator.
|
|
|
|
|
|
|
|
## Add a webhook to all projects
|
|
|
|
|
|
|
|
To add a webhook to all projects, run:
|
2013-06-05 10:32:22 -04:00
|
|
|
|
2020-01-30 10:09:15 -05:00
|
|
|
```shell
|
2019-07-01 00:24:02 -04:00
|
|
|
# omnibus-gitlab
|
|
|
|
sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook"
|
2020-04-28 02:09:49 -04:00
|
|
|
|
2019-07-01 00:24:02 -04:00
|
|
|
# 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
|
|
|
|
2020-04-28 02:09:49 -04:00
|
|
|
## Add a webhook to projects in a namespace
|
|
|
|
|
|
|
|
To add a webhook to all projects in a specific namespace, run:
|
2013-06-05 10:32:22 -04:00
|
|
|
|
2020-01-30 10:09:15 -05:00
|
|
|
```shell
|
2019-07-01 00:24:02 -04:00
|
|
|
# omnibus-gitlab
|
2020-04-28 02:09:49 -04:00
|
|
|
sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=<namespace>
|
|
|
|
|
2019-07-01 00:24:02 -04:00
|
|
|
# source installations
|
2020-04-28 02:09:49 -04:00
|
|
|
bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=<namespace> RAILS_ENV=production
|
2019-06-30 23:36:23 -04:00
|
|
|
```
|
2013-06-05 10:32:22 -04:00
|
|
|
|
2020-04-28 02:09:49 -04:00
|
|
|
## Remove a webhook from projects
|
|
|
|
|
|
|
|
To remove a webhook from all projects, run:
|
2013-06-05 10:32:22 -04:00
|
|
|
|
2020-01-30 10:09:15 -05:00
|
|
|
```shell
|
2019-07-01 00:24:02 -04:00
|
|
|
# omnibus-gitlab
|
|
|
|
sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook"
|
2020-04-28 02:09:49 -04:00
|
|
|
|
2019-07-01 00:24:02 -04:00
|
|
|
# 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
|
|
|
|
2020-04-28 02:09:49 -04:00
|
|
|
## Remove a webhook from projects in a namespace
|
|
|
|
|
|
|
|
To remove a webhook from projects in a specific namespace, run:
|
2013-06-05 10:32:22 -04:00
|
|
|
|
2020-01-30 10:09:15 -05:00
|
|
|
```shell
|
2019-07-01 00:24:02 -04:00
|
|
|
# omnibus-gitlab
|
2020-04-28 02:09:49 -04:00
|
|
|
sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=<namespace>
|
|
|
|
|
2019-07-01 00:24:02 -04:00
|
|
|
# source installations
|
2020-04-28 02:09:49 -04:00
|
|
|
bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=<namespace> RAILS_ENV=production
|
2019-06-30 23:36:23 -04:00
|
|
|
```
|
2013-06-05 10:32:22 -04:00
|
|
|
|
2020-04-28 02:09:49 -04:00
|
|
|
## List all webhooks
|
|
|
|
|
|
|
|
To list all webhooks, run:
|
2013-06-05 10:32:22 -04:00
|
|
|
|
2020-01-30 10:09:15 -05:00
|
|
|
```shell
|
2019-07-01 00:24:02 -04:00
|
|
|
# omnibus-gitlab
|
|
|
|
sudo gitlab-rake gitlab:web_hook:list
|
2020-04-28 02:09:49 -04:00
|
|
|
|
2019-07-01 00:24:02 -04:00
|
|
|
# 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
|
|
|
|
2020-04-28 02:09:49 -04:00
|
|
|
## List webhooks for projects in a namespace
|
|
|
|
|
|
|
|
To list all webhook for projects in a specified namespace, run:
|
2013-06-05 10:32:22 -04:00
|
|
|
|
2020-01-30 10:09:15 -05:00
|
|
|
```shell
|
2019-07-01 00:24:02 -04:00
|
|
|
# omnibus-gitlab
|
2020-04-28 02:09:49 -04:00
|
|
|
sudo gitlab-rake gitlab:web_hook:list NAMESPACE=<namespace>
|
|
|
|
|
2019-07-01 00:24:02 -04:00
|
|
|
# source installations
|
2020-04-28 02:09:49 -04:00
|
|
|
bundle exec rake gitlab:web_hook:list NAMESPACE=<namespace> RAILS_ENV=production
|
2019-07-01 00:24:02 -04:00
|
|
|
```
|