diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-02-19 19:20:53 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-02-26 16:06:49 +0200 |
commit | 5bb435d0e75ad84e2fc379208cc36a25a4574453 (patch) | |
tree | e65d8278aa37adb8467e05e4bbf15094b43b870c /lib/tasks/plugins.rake | |
parent | b985fe95b6c30bc83725e9b5e18a79a8ceb900d3 (diff) | |
download | gitlab-ce-5bb435d0e75ad84e2fc379208cc36a25a4574453.tar.gz |
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.rake | 15 |
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 |