2018-02-08 11:14:10 -05:00
|
|
|
namespace :plugins do
|
2018-02-19 12:20:53 -05:00
|
|
|
desc 'Validate existing plugins'
|
|
|
|
task validate: :environment do
|
|
|
|
puts 'Validating plugins from /plugins directory'
|
|
|
|
|
2018-02-19 12:55:54 -05:00
|
|
|
Gitlab::Plugin.files.each do |file|
|
|
|
|
result = Gitlab::Plugin.execute(file, Gitlab::DataBuilder::Push::SAMPLE_DATA)
|
|
|
|
|
|
|
|
if result
|
|
|
|
puts "* #{file} succeed (zero exit code)"
|
2018-02-19 12:20:53 -05:00
|
|
|
else
|
2018-02-19 12:55:54 -05:00
|
|
|
puts "* #{file} failure (non-zero exit code)"
|
2018-02-19 12:20:53 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2018-02-08 11:14:10 -05:00
|
|
|
end
|