Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
feb11c69
Commit
feb11c69
authored
Nov 30, 2021
by
Maxime Orefice
Committed by
Grzegorz Bizon
Nov 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Gitlab::Ci::Features
parent
439b2200
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
34 deletions
+5
-34
app/services/auto_merge/base_service.rb
app/services/auto_merge/base_service.rb
+1
-1
app/services/ci/update_build_state_service.rb
app/services/ci/update_build_state_service.rb
+3
-2
app/services/merge_requests/create_pipeline_service.rb
app/services/merge_requests/create_pipeline_service.rb
+1
-1
lib/gitlab/ci/features.rb
lib/gitlab/ci/features.rb
+0
-30
No files found.
app/services/auto_merge/base_service.rb
View file @
feb11c69
...
...
@@ -64,7 +64,7 @@ module AutoMerge
# NOTE: This method is to be removed when `disallow_to_create_merge_request_pipelines_in_target_project`
# feature flag is removed.
def
self
.
can_add_to_merge_train?
(
merge_request
)
if
Gitlab
::
Ci
::
Features
.
disallow_to_create_merge_request_pipelines_in_target_project?
(
merge_request
.
target_project
)
if
::
Feature
.
enabled?
(
:ci_disallow_to_create_merge_request_pipelines_in_target_project
,
merge_request
.
target_project
)
merge_request
.
for_same_project?
else
true
...
...
app/services/ci/update_build_state_service.rb
View file @
feb11c69
...
...
@@ -216,11 +216,12 @@ module Ci
end
def
chunks_migration_enabled?
::
Gitlab
::
Ci
::
Features
.
accept_trace?
(
build
.
project
)
::
Feature
.
enabled?
(
:ci_enable_live_trace
,
build
.
project
)
&&
::
Feature
.
enabled?
(
:ci_accept_trace
,
build
.
project
,
type: :ops
,
default_enabled:
true
)
end
def
log_invalid_chunks?
::
Gitlab
::
Ci
::
Features
.
log_invalid_trace_chunks?
(
build
.
project
)
::
Feature
.
enabled?
(
:ci_trace_log_invalid_chunks
,
build
.
project
,
type: :ops
,
default_enabled:
false
)
end
end
end
app/services/merge_requests/create_pipeline_service.rb
View file @
feb11c69
...
...
@@ -48,7 +48,7 @@ module MergeRequests
end
def
can_create_pipeline_in_target_project?
(
merge_request
)
if
Gitlab
::
Ci
::
Features
.
disallow_to_create_merge_request_pipelines_in_target_project?
(
merge_request
.
target_project
)
if
::
Feature
.
enabled?
(
:ci_disallow_to_create_merge_request_pipelines_in_target_project
,
merge_request
.
target_project
)
merge_request
.
for_same_project?
else
can?
(
current_user
,
:create_pipeline
,
merge_request
.
target_project
)
&&
...
...
lib/gitlab/ci/features.rb
deleted
100644 → 0
View file @
439b2200
# frozen_string_literal: true
module
Gitlab
module
Ci
##
# Deprecated: Ci::Features is a class that aggregates all CI/CD feature flags in one place.
#
module
Features
# NOTE: The feature flag `disallow_to_create_merge_request_pipelines_in_target_project`
# is a safe switch to disable the feature for a particular project when something went wrong,
# therefore it's not supposed to be enabled by default.
def
self
.
disallow_to_create_merge_request_pipelines_in_target_project?
(
target_project
)
::
Feature
.
enabled?
(
:ci_disallow_to_create_merge_request_pipelines_in_target_project
,
target_project
)
end
def
self
.
accept_trace?
(
project
)
::
Feature
.
enabled?
(
:ci_enable_live_trace
,
project
)
&&
::
Feature
.
enabled?
(
:ci_accept_trace
,
project
,
type: :ops
,
default_enabled:
true
)
end
def
self
.
log_invalid_trace_chunks?
(
project
)
::
Feature
.
enabled?
(
:ci_trace_log_invalid_chunks
,
project
,
type: :ops
,
default_enabled:
false
)
end
def
self
.
gldropdown_tags_enabled?
::
Feature
.
enabled?
(
:gldropdown_tags
,
default_enabled: :yaml
)
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment