Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-02-19 20:20:53 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-02-26 17:06:49 +0300
commit5bb435d0e75ad84e2fc379208cc36a25a4574453 (patch)
treee65d8278aa37adb8467e05e4bbf15094b43b870c /lib/tasks/plugins.rake
parentb985fe95b6c30bc83725e9b5e18a79a8ceb900d3 (diff)
Remove plugin initializer and add plugins:validate rake task
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/tasks/plugins.rake')
-rw-r--r--lib/tasks/plugins.rake15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/tasks/plugins.rake b/lib/tasks/plugins.rake
index fac6070ea9b..8728e232c9c 100644
--- a/lib/tasks/plugins.rake
+++ b/lib/tasks/plugins.rake
@@ -22,4 +22,19 @@ namespace :plugins do
puts "Failed to save #{file_path}."
end
end
+
+ desc 'Validate existing plugins'
+ task validate: :environment do
+ puts 'Validating plugins from /plugins directory'
+
+ Gitlab::Plugin.all.each do |plugin|
+ begin
+ plugin.new.execute(Gitlab::DataBuilder::Push::SAMPLE_DATA)
+ rescue => e
+ puts "- #{plugin} raised an exception during boot check. #{e}"
+ else
+ puts "- #{plugin} passed validation check"
+ end
+ end
+ end
end