Module: Gitlab::Ci::Features

Defined in:
lib/gitlab/ci/features.rb

Overview

Ci::Features is a class that aggregates all CI/CD feature flags in one place.

Class Method Summary collapse

Class Method Details

.artifacts_exclude_enabled?Boolean

Returns:

  • (Boolean)

9
10
11
# File 'lib/gitlab/ci/features.rb', line 9

def self.artifacts_exclude_enabled?
  ::Feature.enabled?(:ci_artifacts_exclude, default_enabled: true)
end

.bulk_insert_on_create?(project) ⇒ Boolean

Returns:

  • (Boolean)

38
39
40
# File 'lib/gitlab/ci/features.rb', line 38

def self.bulk_insert_on_create?(project)
  ::Feature.enabled?(:ci_bulk_insert_on_create, project, default_enabled: true)
end

.child_of_child_pipeline_enabled?(project) ⇒ Boolean

Returns:

  • (Boolean)

69
70
71
# File 'lib/gitlab/ci/features.rb', line 69

def self.child_of_child_pipeline_enabled?(project)
  ::Feature.enabled?(:ci_child_of_child_pipeline, project, default_enabled: false)
end

.ci_if_parenthesis_enabled?Boolean

Returns:

  • (Boolean)

42
43
44
# File 'lib/gitlab/ci/features.rb', line 42

def self.ci_if_parenthesis_enabled?
  ::Feature.enabled?(:ci_if_parenthesis_enabled, default_enabled: true)
end

.ci_plan_needs_size_limit?(project) ⇒ Boolean

Returns:

  • (Boolean)

53
54
55
# File 'lib/gitlab/ci/features.rb', line 53

def self.ci_plan_needs_size_limit?(project)
  ::Feature.enabled?(:ci_plan_needs_size_limit, project, default_enabled: true)
end

.coverage_report_view?(project) ⇒ Boolean

Returns:

  • (Boolean)

65
66
67
# File 'lib/gitlab/ci/features.rb', line 65

def self.coverage_report_view?(project)
  ::Feature.enabled?(:coverage_report_view, project)
end

.disallow_to_create_merge_request_pipelines_in_target_project?(target_project) ⇒ Boolean

NOTE: The feature flag `disallow_to_create_merge_request_pipelines_in_target_project` is a safe switch to disable the feature for a parituclar project when something went wrong, therefore it's not supposed to be enabled by default.

Returns:

  • (Boolean)

49
50
51
# File 'lib/gitlab/ci/features.rb', line 49

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

.instance_variables_ui_enabled?Boolean

Returns:

  • (Boolean)

17
18
19
# File 'lib/gitlab/ci/features.rb', line 17

def self.instance_variables_ui_enabled?
  ::Feature.enabled?(:ci_instance_variables_ui, default_enabled: true)
end

.job_heartbeats_runner?(project) ⇒ Boolean

Returns:

  • (Boolean)

13
14
15
# File 'lib/gitlab/ci/features.rb', line 13

def self.job_heartbeats_runner?(project)
  ::Feature.enabled?(:ci_job_heartbeats_runner, project, default_enabled: true)
end

.lint_creates_pipeline_with_dry_run?(project) ⇒ Boolean

Returns:

  • (Boolean)

57
58
59
# File 'lib/gitlab/ci/features.rb', line 57

def self.lint_creates_pipeline_with_dry_run?(project)
  ::Feature.enabled?(:ci_lint_creates_pipeline_with_dry_run, project, default_enabled: true)
end

.pipeline_latest?Boolean

Returns:

  • (Boolean)

21
22
23
# File 'lib/gitlab/ci/features.rb', line 21

def self.pipeline_latest?
  ::Feature.enabled?(:ci_pipeline_latest, default_enabled: true)
end

.pipeline_status_omit_commit_sha_in_cache_key?(project) ⇒ Boolean

Returns:

  • (Boolean)

25
26
27
# File 'lib/gitlab/ci/features.rb', line 25

def self.pipeline_status_omit_commit_sha_in_cache_key?(project)
  Feature.enabled?(:ci_pipeline_status_omit_commit_sha_in_cache_key, project, default_enabled: true)
end

.project_transactionless_destroy?(project) ⇒ Boolean

Returns:

  • (Boolean)

61
62
63
# File 'lib/gitlab/ci/features.rb', line 61

def self.project_transactionless_destroy?(project)
  Feature.enabled?(:project_transactionless_destroy, project, default_enabled: false)
end

.raise_job_rules_without_workflow_rules_warning?Boolean

Returns:

  • (Boolean)

34
35
36
# File 'lib/gitlab/ci/features.rb', line 34

def self.raise_job_rules_without_workflow_rules_warning?
  ::Feature.enabled?(:ci_raise_job_rules_without_workflow_rules_warning, default_enabled: true)
end

.store_pipeline_messages?(project) ⇒ Boolean

Returns:

  • (Boolean)

30
31
32
# File 'lib/gitlab/ci/features.rb', line 30

def self.store_pipeline_messages?(project)
  ::Feature.enabled?(:ci_store_pipeline_messages, project, default_enabled: true)
end