summaryrefslogtreecommitdiff
path: root/lib/tasks/plugins.rake
diff options
context:
space:
mode:
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