diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 09:40:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 09:40:42 +0000 |
commit | ee664acb356f8123f4f6b00b73c1e1cf0866c7fb (patch) | |
tree | f8479f94a28f66654c6a4f6fb99bad6b4e86a40e /app/models/deployment.rb | |
parent | 62f7d5c5b69180e82ae8196b7b429eeffc8e7b4f (diff) | |
download | gitlab-ce-ee664acb356f8123f4f6b00b73c1e1cf0866c7fb.tar.gz |
Add latest changes from gitlab-org/gitlab@15-5-stable-eev15.5.0-rc42
Diffstat (limited to 'app/models/deployment.rb')
-rw-r--r-- | app/models/deployment.rb | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb index dafcbc593be..20841bc14cd 100644 --- a/app/models/deployment.rb +++ b/app/models/deployment.rb @@ -105,6 +105,7 @@ class Deployment < ApplicationRecord after_transition any => :running do |deployment| next unless deployment.project.ci_forward_deployment_enabled? + next if Feature.enabled?(:prevent_outdated_deployment_jobs, deployment.project) deployment.run_after_commit do Deployments::DropOlderDeploymentsWorker.perform_async(id) @@ -282,27 +283,11 @@ class Deployment < ApplicationRecord end def manual_actions - environment_manual_actions - end - - def other_manual_actions - @other_manual_actions ||= deployable.try(:other_manual_actions) - end - - def environment_manual_actions - @environment_manual_actions ||= deployable.try(:environment_manual_actions) + @manual_actions ||= deployable.try(:other_manual_actions) end def scheduled_actions - environment_scheduled_actions - end - - def environment_scheduled_actions - @environment_scheduled_actions ||= deployable.try(:environment_scheduled_actions) - end - - def other_scheduled_actions - @other_scheduled_actions ||= deployable.try(:other_scheduled_actions) + @scheduled_actions ||= deployable.try(:other_scheduled_actions) end def playable_build |