diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/models/project_ci_cd_setting.rb | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/models/project_ci_cd_setting.rb')
-rw-r--r-- | app/models/project_ci_cd_setting.rb | 5 |
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 |