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 @@ ...@@ -19,9 +19,6 @@
%li %li
.monospace .monospace
= File.basename(file) = 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 - else
.card.bg-light.text-center .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. ...@@ -54,7 +54,7 @@ Learn how to install, configure, update, and maintain your GitLab instance.
- [Environment variables](environment_variables.md): Supported environment - [Environment variables](environment_variables.md): Supported environment
variables that can be used to override their default values to configure variables that can be used to override their default values to configure
GitLab. 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. introduce custom integrations without modifying GitLab source code.
- [Enforcing Terms of Service](../user/admin_area/settings/terms.md) - [Enforcing Terms of Service](../user/admin_area/settings/terms.md)
- [Third party offers](../user/admin_area/settings/third_party_offers.md) - [Third party offers](../user/admin_area/settings/third_party_offers.md)
......
...@@ -11,7 +11,7 @@ module Gitlab ...@@ -11,7 +11,7 @@ module Gitlab
end end
def self.dir_glob def self.dir_glob
Dir.glob([Rails.root.join('file_hooks/*'), Rails.root.join('plugins/*')]) Dir.glob(Rails.root.join('file_hooks/*'))
end end
private_class_method :dir_glob private_class_method :dir_glob
......
...@@ -3,14 +3,9 @@ ...@@ -3,14 +3,9 @@
namespace :file_hooks do namespace :file_hooks do
desc 'Validate existing file hooks' desc 'Validate existing file hooks'
task validate: :environment do 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| 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) success, message = Gitlab::FileHook.execute(file, Gitlab::DataBuilder::Push::SAMPLE_DATA)
if success if success
......
...@@ -24711,9 +24711,6 @@ msgstr "" ...@@ -24711,9 +24711,6 @@ msgstr ""
msgid "Please wait while we import the repository for you. Refresh at will." msgid "Please wait while we import the repository for you. Refresh at will."
msgstr "" 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" msgid "Pod does not exist"
msgstr "" msgstr ""
......
*
!*/
!.gitignore
!.gitkeep
!examples/*
...@@ -37,24 +37,6 @@ RSpec.describe 'Admin::Hooks' do ...@@ -37,24 +37,6 @@ RSpec.describe 'Admin::Hooks' do
expect(page).to have_content('foo.rb') expect(page).to have_content('foo.rb')
expect(page).to have_content('bar.clj') expect(page).to have_content('bar.clj')
end 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 end
describe 'New Hook' do 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