Commit 36e83099 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'dz-drop-plugins-dir' into 'master'

Drop plugins dir support

See merge request gitlab-org/gitlab!55168
parents d3ad2fb9 dbae184e
......@@ -19,9 +19,6 @@
%li
.monospace
= File.basename(file)
- if File.dirname(file).ends_with?('plugins')
.text-warning
= _('Plugins directory is deprecated and will be removed in 14.0. Please move this file into /file_hooks directory.')
- else
.card.bg-light.text-center
......
---
title: Drop plugins directory support
merge_request: 55168
author:
type: removed
......@@ -54,7 +54,7 @@ Learn how to install, configure, update, and maintain your GitLab instance.
- [Environment variables](environment_variables.md): Supported environment
variables that can be used to override their default values to configure
GitLab.
- [Plugins](file_hooks.md): With custom plugins, GitLab administrators can
- [File hooks](file_hooks.md): With custom file hooks, GitLab administrators can
introduce custom integrations without modifying GitLab source code.
- [Enforcing Terms of Service](../user/admin_area/settings/terms.md)
- [Third party offers](../user/admin_area/settings/third_party_offers.md)
......
......@@ -11,7 +11,7 @@ module Gitlab
end
def self.dir_glob
Dir.glob([Rails.root.join('file_hooks/*'), Rails.root.join('plugins/*')])
Dir.glob(Rails.root.join('file_hooks/*'))
end
private_class_method :dir_glob
......
......@@ -3,14 +3,9 @@
namespace :file_hooks do
desc 'Validate existing file hooks'
task validate: :environment do
puts 'Validating file hooks from /file_hooks and /plugins directories'
puts 'Validating file hooks from /file_hooks directories'
Gitlab::FileHook.files.each do |file|
if File.dirname(file).ends_with?('plugins')
puts 'DEPRECATED: /plugins directory is deprecated and will be removed in 14.0. ' \
'Please move your files into /file_hooks directory.'
end
success, message = Gitlab::FileHook.execute(file, Gitlab::DataBuilder::Push::SAMPLE_DATA)
if success
......
......@@ -24711,9 +24711,6 @@ msgstr ""
msgid "Please wait while we import the repository for you. Refresh at will."
msgstr ""
msgid "Plugins directory is deprecated and will be removed in 14.0. Please move this file into /file_hooks directory."
msgstr ""
msgid "Pod does not exist"
msgstr ""
......
*
!*/
!.gitignore
!.gitkeep
!examples/*
......@@ -37,24 +37,6 @@ RSpec.describe 'Admin::Hooks' do
expect(page).to have_content('foo.rb')
expect(page).to have_content('bar.clj')
end
context 'deprecation warning' do
it 'shows warning for plugins directory' do
allow(Gitlab::FileHook).to receive(:files).and_return(['plugins/foo.rb'])
visit admin_hooks_path
expect(page).to have_content('Plugins directory is deprecated and will be removed in 14.0')
end
it 'does not show warning for file_hooks directory' do
allow(Gitlab::FileHook).to receive(:files).and_return(['file_hooks/foo.rb'])
visit admin_hooks_path
expect(page).not_to have_content('Plugins directory is deprecated and will be removed in 14.0')
end
end
end
describe 'New Hook' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment