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

Constants included from ResetOnUnionError

ResetOnUnionError::MAX_RESET_PERIOD

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

#keep_latest_artifacts_available?Boolean

Returns:

  • (Boolean)


26
27
28
29
# File 'app/models/project_ci_cd_setting.rb', line 26

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