Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-16 18:08:41 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-16 18:08:41 +0300
commitd47f9d2304dbc3a23bba7fe7a5cd07218eeb41cd (patch)
tree4b4efa1ccd8246fba2dc9f8816d9d2c0268e9818 /lib/tasks/file_hooks.rake
parentc158fa8d69c704663d289341a014c44c062cda88 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/tasks/file_hooks.rake')
-rw-r--r--lib/tasks/file_hooks.rake16
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