Class: ProjectCiCdSetting

Inherits:
ApplicationRecord show all
Includes:
ChronicDurationAttribute
Defined in:
app/models/project_ci_cd_setting.rb

Constant Summary collapse

DEFAULT_GIT_DEPTH =
20

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Instance Method Summary collapse

Methods included from ChronicDurationAttribute

#chronic_duration_attributes, #output_chronic_duration_attribute

Methods inherited from ApplicationRecord

cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order

Methods included from SensitiveSerializableHash

#serializable_hash

Instance Method Details

#forward_deployment_enabled?Boolean

Returns:

  • (Boolean)

24
25
26
# File 'app/models/project_ci_cd_setting.rb', line 24

def forward_deployment_enabled?
  super && ::Feature.enabled?(:forward_deployment_enabled, project)
end

#keep_latest_artifacts_available?Boolean

Returns:

  • (Boolean)

28
29
30
31
# File 'app/models/project_ci_cd_setting.rb', line 28

def keep_latest_artifacts_available?
  # The project level feature can only be enabled when the feature is enabled instance wide
  Gitlab::CurrentSettings.current_application_settings.keep_latest_artifact? && keep_latest_artifact?
end