summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-02-28 12:31:19 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-02-28 12:31:19 +0200
commit886d442b405a0db3dccc1b24e050244f65099826 (patch)
tree54f756024a835127f1bbd649c50c1ae6b71ee976
parent2577ff7fd656f301c4b1909f0a1c358c8c30a614 (diff)
downloadgitlab-ce-886d442b405a0db3dccc1b24e050244f65099826.tar.gz
Improve plugins documentation and remove unnecessary rake task
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--doc/administration/plugins.md11
-rw-r--r--lib/tasks/plugins.rake5
2 files changed, 9 insertions, 7 deletions
diff --git a/doc/administration/plugins.md b/doc/administration/plugins.md
index ed1a3480ffc..c91ac3012b9 100644
--- a/doc/administration/plugins.md
+++ b/doc/administration/plugins.md
@@ -11,7 +11,8 @@ A plugin will run on each event so it's up to you to filter events or projects w
## Setup
-Plugins must be placed directly into `plugins` directory, subdirectories will be ignored. There is an `example` directory inside `plugins` where you can find some basic examples.
+Plugins must be placed directly into `plugins` directory, subdirectories will be ignored.
+There is an `example` directory inside `plugins` where you can find some basic examples.
Follow the steps below to set up a custom hook:
@@ -30,9 +31,15 @@ Follow the steps below to set up a custom hook:
That's it! Assuming the plugin code is properly implemented the hook will fire
as appropriate. Plugins file list is updated for each event. There is no need to restart GitLab to apply a new plugin.
+If a plugin executes with non-zero exit code or GitLab fails to execute it, a
+message will be logged to `plugin.log`.
+
## Validation
-Writing own plugin can be tricky and its easier if you can check it without altering the system. We provided a rake task you can use with staging environment to test your plugin before using it in production. The rake task will use a sample data and execute each of plugins. By output you should be able to determine if system sees your plugin and if it was executed without errors.
+Writing own plugin can be tricky and its easier if you can check it without altering the system.
+We provided a rake task you can use with staging environment to test your plugin before using it in production.
+The rake task will use a sample data and execute each of plugins. By output you should be able to determine if
+system sees your plugin and if it was executed without errors.
```bash
# Omnibus installations
diff --git a/lib/tasks/plugins.rake b/lib/tasks/plugins.rake
index 7a9de3afbec..e73dd7e68df 100644
--- a/lib/tasks/plugins.rake
+++ b/lib/tasks/plugins.rake
@@ -13,9 +13,4 @@ namespace :plugins do
end
end
end
-
- desc 'Validate existing plugins'
- task validate_async: :environment do
- Gitlab::Plugin.execute_all_async(Gitlab::DataBuilder::Push::SAMPLE_DATA)
- end
end