2020-05-13 18:08:47 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module Ci
|
|
|
|
##
|
2021-07-22 09:08:22 +00:00
|
|
|
# Deprecated: Ci::Features is a class that aggregates all CI/CD feature flags in one place.
|
2020-05-13 18:08:47 +00:00
|
|
|
#
|
|
|
|
module Features
|
2020-09-04 09:08:38 +00:00
|
|
|
# NOTE: The feature flag `disallow_to_create_merge_request_pipelines_in_target_project`
|
2020-11-03 15:09:05 +00:00
|
|
|
# is a safe switch to disable the feature for a particular project when something went wrong,
|
2020-09-04 09:08:38 +00:00
|
|
|
# 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)
|
2020-07-15 21:09:26 +00:00
|
|
|
end
|
2020-07-22 18:09:27 +00:00
|
|
|
|
2020-09-15 18:09:43 +00:00
|
|
|
def self.accept_trace?(project)
|
|
|
|
::Feature.enabled?(:ci_enable_live_trace, project) &&
|
2020-10-08 12:08:31 +00:00
|
|
|
::Feature.enabled?(:ci_accept_trace, project, type: :ops, default_enabled: true)
|
2020-09-15 18:09:43 +00:00
|
|
|
end
|
2020-09-16 09:09:43 +00:00
|
|
|
|
2020-10-06 12:08:38 +00:00
|
|
|
def self.log_invalid_trace_chunks?(project)
|
|
|
|
::Feature.enabled?(:ci_trace_log_invalid_chunks, project, type: :ops, default_enabled: false)
|
|
|
|
end
|
|
|
|
|
2021-05-07 12:10:27 +00:00
|
|
|
def self.gldropdown_tags_enabled?
|
|
|
|
::Feature.enabled?(:gldropdown_tags, default_enabled: :yaml)
|
2021-03-05 06:09:26 +00:00
|
|
|
end
|
2020-05-13 18:08:47 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|