Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project_ci_cd_setting.rb')
-rw-r--r--app/models/project_ci_cd_setting.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/project_ci_cd_setting.rb b/app/models/project_ci_cd_setting.rb
index e5fc481b035..31be0759cd0 100644
--- a/app/models/project_ci_cd_setting.rb
+++ b/app/models/project_ci_cd_setting.rb
@@ -21,6 +21,11 @@ class ProjectCiCdSetting < ApplicationRecord
super && ::Feature.enabled?(:forward_deployment_enabled, project, default_enabled: true)
end
+ 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
+
private
def set_default_git_depth