WebhookのRakeタスク管理
- プラン: Free、Premium、Ultimate
- 提供形態: GitLab Self-Managed
GitLabは、Webhook管理用のRakeタスクを提供します。
管理者は、webhookによるローカルネットワークへのリクエストを許可またはブロックできます。
すべてのプロジェクトにWebhookを追加
すべてのプロジェクトにWebhookを追加するには、次を実行します:
# 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ネームスペース内のプロジェクトにWebhookを追加
特定のネームスペース内のすべてのプロジェクトにWebhookを追加するには、次を実行します:
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=<namespace>
# source installations
bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=<namespace> RAILS_ENV=productionプロジェクトからWebhookを削除
すべてのプロジェクトからWebhookを削除するには、次を実行します:
# 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ネームスペース内のプロジェクトからWebhookを削除
特定のネームスペース内のプロジェクトからWebhookを削除するには、次を実行します:
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=<namespace>
# source installations
bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=<namespace> RAILS_ENV=productionすべてのWebhookをリスト
すべてのWebhookをリストするには、次を実行します:
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:list
# source installations
bundle exec rake gitlab:web_hook:list RAILS_ENV=productionネームスペース内のプロジェクトのWebhookをリスト
指定されたネームスペース内のプロジェクトのすべてのWebhookをリストするには、次を実行します:
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:list NAMESPACE=<namespace>
# source installations
bundle exec rake gitlab:web_hook:list NAMESPACE=<namespace> RAILS_ENV=production