diff options
Diffstat (limited to 'lib/tasks/file_hooks.rake')
-rw-r--r-- | lib/tasks/file_hooks.rake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/tasks/file_hooks.rake b/lib/tasks/file_hooks.rake new file mode 100644 index 00000000000..20a726de65b --- /dev/null +++ b/lib/tasks/file_hooks.rake @@ -0,0 +1,16 @@ +namespace :file_hooks do + desc 'Validate existing plugins' + task validate: :environment do + puts 'Validating file hooks from /plugins directory' + + Gitlab::FileHook.files.each do |file| + success, message = Gitlab::FileHook.execute(file, Gitlab::DataBuilder::Push::SAMPLE_DATA) + + if success + puts "* #{file} succeed (zero exit code)." + else + puts "* #{file} failure (non-zero exit code). #{message}" + end + end + end +end |