debian-mirror-gitlab/lib/tasks/file_hooks.rake

17 lines
463 B
Ruby
Raw Normal View History

2020-03-09 13:42:32 +05:30
namespace :file_hooks do
2018-03-27 19:54:05 +05:30
desc 'Validate existing plugins'
task validate: :environment do
2020-03-09 13:42:32 +05:30
puts 'Validating file hooks from /plugins directory'
2018-03-27 19:54:05 +05:30
2020-03-09 13:42:32 +05:30
Gitlab::FileHook.files.each do |file|
success, message = Gitlab::FileHook.execute(file, Gitlab::DataBuilder::Push::SAMPLE_DATA)
2018-03-27 19:54:05 +05:30
if success
puts "* #{file} succeed (zero exit code)."
else
puts "* #{file} failure (non-zero exit code). #{message}"
end
end
end
end